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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Extracting S3 data into PowerBI using Python

I have this S3 bucket which has 100's of CSV files all in zip files.

What I am currently doing is using Python to dowload each of the files, save them locally, then combine the files and then importing the final CSV into PowerBI Desktop. This is quite a long process to run every so often

 

I would like to have it all so I Get Data using a Python Script and then use that in my PBI model

 

Has anyone got any code template to make this easy for me?

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @Anonymous 

According to your description, you want to directly connect the Python code to Power Bi to get the data from S3 .

 If so, then I think you need to read your csv file and perform ETL operations inside Python.

For the code , sorry for i have no test experience for this data source.

But as searched , you can refer to this post , i hope it will be helpful:
Extract, Transform, and Load Amazon S3 Data in Python (cdata.com)

amazon web services - How to read a csv file from an s3 bucket using Pandas in Python - Stack Overflow

Using Python in Power BI. Step by step guide on how to enable… | by Tommi Ranta | Towards Data Science

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.