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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!