Providing you are a LUSID user with sufficient access control permissions, you can schedule a Luminesce SQL query to run automatically at a set time or on a regular basis.

Note: If you are the LUSID domain owner, you are automatically assigned the built-in lusid-administrator role, which has all the permissions necessary to use the providers in this article.

Once it has run, the results of the scheduled query are available in console format. However, it might be more useful to include an alternative output destination in the query itself, for example by using the Drive.SaveAs provider to write the results directly to a CSV file in Drive.

Using the LUSID web app

  1. Sign in to the LUSID web app using the credentials of a LUSID administrator.
  2. From the top left menu, select Data Virtualisation > Query Editor.
  3. Write a valid query (you might want to click the Run button to test the results are as you expect).
  4. Click the Schedule query button:

  5. On the Specify job page of the Create Schedule screen, specify a Scope, Code, Schedule name and Description:
  6. On the Arguments page, check the following mandatory arguments (boxes in red):
    • QUERY_01 contains your Luminesce SQL query.
    • --authPersonalAccessToken is set to %FBN_PAT%. If not, perform Step 1 again.
    • --authFlow is set to None.
    • --timeout is set to 3540 or lower.

    You can ignore all the other arguments.

  7. On the Triggers page, click the Add trigger button to add at least one trigger for the schedule (note all times are in UTC):

    Note you can choose the Cron option to explicitly specify a cron expression adhering to this standard.

The scheduled query should now automatically run at the appointed time(s). You can see (and potentially pause) it by navigating to the Jobs & Scheduling > Schedules dashboard:

Once the scheduled query has run successfully, you can navigate to the Jobs & Scheduling > History dashboard and click on the appropriate Run ID URL to access the details:

On the Jobs & Scheduling > Details dashboard, navigate to the Console Output tab to see the query results: