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.