Forum Discussion
Snowflake data source - Python Pandas - Working Desktop / Not working on Workspace
- Anonymous1 year ago
Hi Pawel_1990 ,
Thank you for reaching out to the Microsoft Community Forum.
Some of the issues listed below:1. Verify Python Installation: Ensure that Python is installed on your machine and that the path to the Python executable is correctly set in the environment variables.
https://learn.microsoft.com/en-us/power-bi/connect-data/service-python-packages-support
2. Python scripts only work with personal gateways. Please refer the below thread
3. Additionally, as Akash_Varuna suggested try running the Python transformations outside Power BI.
If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Thank you
Hi Pawel_1990 ,
Thank you for reaching out to the Microsoft Community Forum.
Some of the issues listed below:
Python Environment on Power BI Service : Ensure that the Python environment on the Power BI Service has the same libraries installed. Unfortunately, you can't directly install packages in Power BI Service, but you can test with a minimal script to isolate the issue. And use a Python script in Power BI Desktop to check for errors before publishing.
Data Source Credentials & Permissions (Snowflake connection issues are common when moving from Desktop to Service due to credential handling):
Go to Power BI Service > Dataset Settings > Data source credentials and verify that the credentials are configured correctly. Check if the Snowflake credentials are supported in the Service (especially if using a custom connector).
DirectQuery vs Import Mode Conflict: You mentioned using DirectQuery for other tables and Import for the Snowflake table. Mixing these modes can cause issues, especially when applying transformations with Python. Try converting the other tables to Import mode to see if that resolves the issue. Alternatively, test with all tables in DirectQuery mode to check for conflicts.
Power BI Service Limitation : The Service has some limitations with Python scripts. No support for interactive visualizations within Python scripts. Certain operations (especially heavy computations) might not run due to resource constraints. Optimize your Pandas code for performance. Test with simpler data to narrow down the problem.
If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Thank you