Skip to content

Snowflake query tag configuration

Versions

This feature is available from Matillion ETL version 1.77.

You can optionally apply a Snowflake object tag to a Matillion ETL job, for example to assist in allocating resource costs within your organization. To do this, you must create a query tag configuration in Matillion ETL, and this configuration will contains the tag details that will be passed to Snowflake when a job is executed.

You can create different tag configuration profiles, allowing you to select one at the time when the job is run. These configuraton profiles are managed through the Query Tag Configuration option on the Matillion ETL Project menu.

For more information on how to analyse SQL execution in your Snowflake account, read Monitor query activity with Query History in the Snowflake documentation.


Manage query tag configurations

On the Project menu, click Query Tag Configuration. This will open the Manage Query Tag Configurations dialog, which displays a list of the configurations you have created. In this dialog, you can:

  • Add a new query tag configuration.
  • Delete a configuration by clicking the X next to it.
  • Edit the details of a configuration by clicking the pencil icon next to it.
  • Click OK to leave the dialog.

Create a query tag configuration

  1. On the Project menu, click Query Tag Configuration.
  2. On the Manage Query Tag Configurations dialog, click + to open the Create Configuration dialog.
  3. Enter the following:
    • Name: A unique name to identify the configuration.
    • Standard Tag Keys: Select some or all of the tag keys listed. These correspond to Matillion ETL automatic variables.
    • Click Generate Configuration. This will populate the Configuration field with the configuration in JSON format.
  4. You can manually edit the generated configuration to include any custom elements you require within the tag configuration.
  5. Click OK to save the configuration.

Set a default tag configuration for an environment

You can associate a default tag configuration with an environment. You must create a tag configuration first, and then associate it with the environment. All jobs that run in the environment will use this tag configuration by default.

You can associate a default tag with an environment in either of the following ways:

  • When creating a new project, the Default Tag drop-down in step 4 will show all tag configurations that you have created. Select the one that will be used as the default for this project's default environment.
  • When creating an environment, the Default Tag drop-down in step 3 will show all tag configurations that you have created. Select the one that will be used as the default for the environment.

In both cases, you can select None if you don't require tags to be associated with jobs executed in the selected environment. If you do this, you can still select a tag configuration when the job runs.


Run jobs using a query tag

You must create a tag configuration before running a job using that configuration.

To run a job using the environment's default tag configuration, run the job as normal. The default tag configuration will be used automatically.

To run a job using a different tag configuration:

  1. Open the job on the Matillion ETL canvas.
  2. Right-click on the canvas and click Run Job Using Tag.
  3. In the Run Job dialog, use the drop-down menu to select the tag configuration you want to use. The configuration will be used for this single run of the job only—the default will not be changed for subsequent runs.

A scheduled job will automatically use the environment's default tag configuration at the time the job is executed.