Global environment variables set dynamically at project level without scenario

Axolotl
Axolotl Registered Posts: 15 ✭✭✭

Hi,

For security needs on project creation on Design node (not automation, no scenario), I would like to use a global variable that is updated at project opening.

For example, a user opens a project, go to a snowflake dataset, create a prepare recipe and run it.

I would like to pass user informations on query tag : {"projectKey": ${projectKey}, "userName":${userName}, ........ }

${projectKey} is ok as its a system variable, but I would like to update other environment variable in DSS settings.

Is there a way to do such thing ? Thanks in advance.


Operating system used: linux aws

Best Answer

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,166 Neuron

    Why do you need to do this? What is the actual requirement you are trying to achive?

  • Axolotl
    Axolotl Registered Posts: 15 ✭✭✭

    In the snowflake cloud environment I need to report for each query : who, when, why, from which tool, from which group, which recipe, etc.

    Such "query tags" works with variables in DSS connection settings. So my variables needs to be dynamically updated.

    Exactly like the builtin ${projectKey} variable. You can use it everywhere in the recipes. I'm trying to create per users variables, per groups variables, etc.

    An equivalent to .bashrc : a python script that will run at project opening and set the values of a couple of environment variables.

    Thanks.

  • Axolotl
    Axolotl Registered Posts: 15 ✭✭✭

    Ok, I understand what you mean. Its like having two people working on the same project and one checkout on a dev branch. The other will switch too.

    One project share all the ressources to all the people.

    I will look for a DSS way.

    The solution with Snowflake connection is interesting. It will be quite different as i have SSO.

    Thanks a lot.

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,166 Neuron

    This might be a better without changing the authentication of the Snowflake connection:

    https://doc.dataiku.com/dss/latest/connecting/sql/snowflake.html#switching-role-and-warehouse

    You can pass a Snowfloke role from a user property. I wonder if oyu can use this to identify who the user is.

Setup Info
    Tags
      Help me…