Forum Discussion

kgupta_egencia's avatar
kgupta_egencia
Cloud Apps
01-30-2026

Ecube build SQL tagging

Hello,

We are working with snowflake data source and have requirement to capture meta for ecube build query from data source. Please suggest how I can set query tagging ?

SET QUERY_TAG = "{Team_Name:TEAM, Application:Sisense ecubename}"

I did check pre build plugins but did not get option to set data source session settings or initial sql settings in python script.

Please suggest.

2 Replies

  • Hello,

    Yes, the use case makes sense, but today Sisense doesn’t provide a way to set Snowflake session parameters (like QUERY_TAG) specifically for Elasticube builds.
    During an ECube build, Sisense fully manages the Snowflake connection and generates the SQL internally. Pre-build Python plugins don’t have access to the Snowflake session, and there’s no supported hook for “initial SQL” or session-level settings such as:

    SET QUERY_TAG = '...'

    So unfortunately, you can’t dynamically tag queries per eCube or per build from a plugin.

    Recommended workarounds:
    Set QUERY_TAG at the Snowflake user level used by Sisense:

    ALTER USER SISENSE_USER SET QUERY_TAG = '{"Application":"Sisense","Purpose":"ElasticubeBuild"}';

    If you need more granularity, use separate Snowflake users per eCube or environment, each with its own QUERY_TAG.

    Both approaches ensure all ECube build queries are tagged, even though the tag can’t be set dynamically.
    If per-ECube or per-build tagging is a requirement, this would need to be raised as a feature enhancement on the Sisense side rather than something configurable today.

  • There is additional parameter option in Sisense connection configuration for snowflake, but nothing in documentation what parameter are supported with this option. Please share if any details are available.