top of page
Search
  • Writer's pictureAdmin

Smart tagging

Inject your custom attributes into Arctica engine to analyze your Snowflake costs by custom attributes as process name, process step etc.


General

Using Snowflake built-in QUERY_TAG can be very useful to pass your custom attributes into Arctica. Then it allows us to break the cost by custom attributes. This will allow you later create custom dimensions and aggregate the cost by each one of your attributes. This is how it is done.


How to tag query

Once you started a session on snowflake you can alter the query tag before each on of your queries.

Example

ALTER SESSION SET QUERY_TAG = "{'process_name':'my most expensive process','process_step':'step 1 - Copy data from stage'}"

Use tagged data in Custom Query

Once data is tagged as variant (e.g. Json) it is very easy to parse these attributes in the UI.

  1. Navigate to Custom Dimensions

  2. Add new


3. Use this formula to parse the JSON:

TRY_PARSE_JSON(QUERY_TAG):process_name::STRING


4. Save.

5. Use this Dimension in the dashboard

148 views0 comments

Comments


bottom of page