Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
ashwini_bora
Regular Visitor

Importing data in Snowflake using Python script

Hi- I am trying to import the data from Snowflake DB using the python script in Power BI and want to create reports using Python provided packages.

 

The complete script works well on Python IDE (Spyder), however getting error while importing as below-

Get Data --> Python Script

 

import snowflake.connector

<code to connect to Snowflake and fetch data>

 

Getting error on first line, while trying to import the snowflake connector, error:

Details: ADO.NET: Python script error. <pi>ImportError: DLL load failed: The specified module could not be found. </pi>

 

Python installation is fine and with other local data sources (from my desktop), it is working well.

 

1 ACCEPTED SOLUTION
ashwini_bora
Regular Visitor

Thank you for your response..

As I had mentioned before, my Python version and execution is working fine.

 

I was able to resolve the issue by invoking the Power BI app from Python environment from Anaconda command prompt using below-

 

(python37) C:\Users\<myuser>\AppData\Local\Microsoft\WindowsApps>PBIDesktopStore

 

 

View solution in original post

3 REPLIES 3
ashwini_bora
Regular Visitor

Thank you for your response..

As I had mentioned before, my Python version and execution is working fine.

 

I was able to resolve the issue by invoking the Power BI app from Python environment from Anaconda command prompt using below-

 

(python37) C:\Users\<myuser>\AppData\Local\Microsoft\WindowsApps>PBIDesktopStore

 

 

v-luwang-msft
Community Support
Community Support

Hi @ashwini_bora ,

Do you know what version of Python your Anaconda environment is using? It seems will running into issues importing packages with 3.6 and 3.7.This error is due to VS not activating the conda environment before launching the python process.

Try to create a new conda env with Python 3.5:

conda create -n py35 anaconda python=3.5

Then pip installing relevant packages (I had issues with PowerBI recognizing conda installs):

 

conda activate py35
pip install matplotlib
pip install pandas

 

After this is complete, you need to point PowerBI to the new env.

 

Including steps for those less familiar:

File -> Options and Settings -> Options -> Python Scripting

 

Then add the Path to your new Env. Mine looks like:

"C:\ProgramData\Anaconda3\envs\py35"

 

details refer: 

https://developercommunity.visualstudio.com/content/problem/362404/importerrordll-load-failed-the-sp...

https://docs.snowflake.com/en/user-guide/python-connector-example.html 

https://addendanalytics.com/blog/snowflake-dwh-connecting-to-python/ 

 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

 

Anonymous
Not applicable

@ashwini_bora  Hi,

 

Try adding a blank query and paste your Python script and make sure you pass the right credentials.

 

Regards,
John Basha Mattipati,
https://www.linkedin.com/in/john-basha-mattipati-06812980/

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors