Forum Discussion
david_busint
1 year agoAdvocate I
Avoiding including Snowflake credentials in Python script when python script uses Snowflake
Hi everyone, I've been testing runing some forecasting scripts in Power BI desktop where the python script imports the data used to generate the forecast from Snowflake. The Snowflake connection...
- 1 year ago
Hi. Power Bi has snowflake connector. You should use them to let powerbi keep the credentials encrypted and secured. Then you can run a python step at Query Editor (Transform Data) to keep going if you prefer transforming data that way.
I hope that helps,
Akash_Varuna
1 year agoSuper User
Hi david_busint Could you please try these
- Use environment variables and retrieve them in the script with os.getenv().
- Store credentials in tools like Azure Key Vault, AWS Secrets Manager, or HashiCorp Vault.
- Use OAuth or key-pair authentication for Snowflake.
- Import Snowflake data via Power BI dataflows to bypass Python handling credentials.
If this post helped please do give a kudos and accept this as a solution
Thanks In Advance