In Azure I work with Azure Synapse Analytics. I have a Synapse Analytics by environment. Once I have finished my pipeline in development environment I have a release pipeline in devops that deploy to preprod env.
Problem is that in my notebooks I have the following parameter : "env" used in this path path = f'abfss://bronze@synapse{env}.dfs.core.windows.net'
Parameter env is in a json that I give in the Parameters tab in Synapse.
My pipeline in preprod fail because in notebook the path is `path = f'abfss://[email protected]'
How can I do to dynamically have the env value in each environment ? I don't want to change it manually because there is a release pipeline in devops.
You can use mssparkutils to get the name of the current environment, instead of pooling it from a parameter:
mssparkutils.env.getWorkspaceName()