Skip to main content

Metadata Query-based Actions Automation

About the automation

Use this automation to write and run advanced SPARQL queries.

Important

This automation is only for advanced users who are trained on using SPARQL queries for automation. You must submit a request with your Customer Success Director to get this automation enabled for your organizations.

Important things to note

The way you write SPARQL queries for this automation is a little different than how you would write the queries from the query editor available in the product from the Project Workspace.

The key differences are:

  • Unlike the queries created from the query editor, the automations run without any context derived from the UI, so you need to be provide this context with the explicit FROM clause in the query (in most cases FROM :current).

  • Similarly, all prefixes used in the query must be defined explicitly in the PREFIX statements

    Important

    To make sure the SPARQL queries for the automation are created correctly and are working, create a project with no connected dataset and test your queries in that project before adding them to the automation.

Configuring the automation

Important

Only Organization administrators can view, configure, and run automations.

To configure the automation:

  1. On the Organization profile page, go to the Automations tab.

  2. In the Automation templates section, locate the Query-based Actions template. Click the Configure button.

  3. In the Configure Query-based Actions window, on the first screen set the following and click Next.

    • Automation name: A name for the automation.

    • Automation description: A brief description.

  4. In the Configure Query-based Actions window, on the next screen add the SPARQL Query and click Next.

  5. On the last screen, set a schedule for the automation. You can set it to run daily, weekly, or monthly at a specific time. Once activated, the automation will execute on the scheduled day and time (within a 30-minute window of the scheduled time). Click Save and continue.

Enabling automations

Once you have finished setting up the automation, the next step is to turn it on. This action will enable the automation to run.

To enable an automation:

  1. On the Organization profile page, go to the Automations tab.

  2. In the Automation section, locate the automation you want to enable and open it by clicking it.

  3. Click the Enable automation link. This option is available only for automations that have never been enabled. If you enable an automation and then disable it, it cannot be enabled again.

Giving the service account access to right resources

When you create the automation and save it, a new service account gets created and shows in the Service accounts list and the Members list on the Organization profile page. By default, the name of the user is the same as the name of the automation.

automation_query_user_created.png
  1. Before running the automation, make sure you give this user access Edit access to the ddw-catalog dataset.

  2. If the automation is reading input from another dataset, then give View access to that dataset. If the permissions are not set properly, the automation will not work.

Running the automation

To run the automation:

  1. On the Organization profile page, go to the Automations tab.

  2. In the Automation section, locate the automation you want to run. Open the Automation details page.

  3. Click the Run button. You also get an option to set a schedule for running the automation.

  4. After the automation is done running, a report is generated and made available in the Project created for the automation.

Viewing the report

To view the automation run report:

  1. On the Organization profile page, go to the Resources tab.

  2. From the Resources tab of the Organization profile page, locate the Project that contains the report for the automation. View the details captured by the automation. Each time the automation runs, it adds a new report to the same project.

    automation_query_results.png

Archiving automations

Important

Once you archive an automation it cannot be enabled again. Only active automations can be archived.

To archive an automation:

  1. On the Organization profile page, go to the Automations tab.

  2. In the Automation section, from the Activated tab, locate the automation you want to archive and open it.

  3. Click the Archive automation link.The archived automation is moved to the Archived tab.

    gov_automation_archive.png