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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
hunter
Regular Visitor

Run Python Scripts on SQL server database that's on the on-premises gateway

Hello all,

 

Just joined the community, so I am sorry if I do not relay my message correctly. Anyways, I have an on-premises gateway setup to connect PowerBI to my native SQL Server DB (SSMS 2012). I am using SQL stored procedures to load my data into PowerBI and then passing parameters to the stored procedure. This all works fine, but now I want to manipulate the data with python, and I need to figure out how to establish a secure connection with python. Currently, I cannot run a python script on the loaded SQL data due to privacy/security issues (data combination error). 

 

I was wondering if anyone knew how to solve this problem, or how to add pandas dataframe as a secure datasource. Moreover, how can I make sure that the connection I'm using with pandas to manipulate my SQL data is secure as well? If there is any other solution that you think might work, please let me know.

 

Thanks!

1 REPLY 1
Anonymous
Not applicable

@hunter,

Have you checked the following official article?

https://docs.microsoft.com/en-us/power-bi/desktop-python-scripts

Regards,
Lydia

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors