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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

How to import large csv to dataset using powershell

Hi,

 

I'm trying to load a many large csv file into powerbi automatically, and to so i've automate the creation of datasets.

However when i try to add rows of data to the dataset in this fashion it simply crashes::

`Add-PowerBIRow -DataSetId $dataset1.Id -TableName $table1.name -Rows (Import-Csv -Path ".\data.csv") ` 

as seen here :: https://docs.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.data/add-powerbirow?view=pow...

if I try iterating over every element and adding individually i get a "tooManyResquests" error, and if I try by chunks it doesn't return an error but simply nothing happens.

 

Is there a proper way to import a csv file into powerBI using the powershell API, in the same fashion as you would do it manually? 

 

thank you,

Leo

 

1 REPLY 1
Hariharan_R
Solution Sage
Solution Sage

Hi @Anonymous 

Are you referrring the regular dataset or push datasets?

The following property is by default disabled for the dataset - "addRowsAPIEnabled": false

If you create a dataset directly using the Powershell then the above property is enabled true so you can use Add-PowerBI.

 

Check - https://petri.com/how-to-push-data-via-powershell-to-powerbi/

Thanks

Hari

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


My Blog :: YouTube Channel :: My Linkedin


Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors