LAST_IMPORT macro
The time returned by LAST_IMPORT is the time at which data was last queried from the
source, not the time at which it was successfully loaded into a table.
Typically, LAST_IMPORT is used with load queries and LAST_EXECUTED is used with scripts. However, LAST_EXECUTED can be used with load queries if required.
When you use LAST_IMPORT, this is the order of events:
- The Modeling Service receives the request to run the load
query.The time at which this happens is the time used by LAST_IMPORT, which receives the command from the user interface or from an API.Note: Network communication can cause a delay between clicking the button to run the macro and the start of the process.
- The query is sent to the Data Lake or to another data source.
- The answer is received from the data source.
- Data is written to the staging tables.
If the load query finishes successfully, the LAST_IMPORT time is displayed here:
- In the Last Loaded field on the Load Queries tab.
- In the application logs, the Load Query Execution Start event logs the start time of the
load query. Note: The Load Query Execution Start event is not enabled by default.
- In the LastSuccessfulLoad column in the load queries object table.