Reputation: 101
I want to automate the import process in power bi, But I can't find how to publish a csv file as a dataset. I'm using a C# solution for this. Is there a way to do that?
Upvotes: 2
Views: 3164
Reputation: 101
After a Power BI updates, it is now possible to import the dataset without importing the whole report. So what I do is that I import the new dataset and I update parameters that I set up for the csv file source (stored in Data lake).
Upvotes: 0
Reputation: 13460
You can't directly import CSV files into a published dataset in Power BI Service. AddRowsAPIEnabled
property of datasets published from Power BI Desktop is false
, i.e. this API is disabled. Currently the only way to enable this API is to create a push dataset programatically using the API (or create a streaming dataset from the site). In this case you will be able to push rows to it (read the CSV file and push batches of rows, either using C# or some other language, even PowerShell). In this case you will be able to create reports with using this dataset. However there are lots of limitations and you should take care of cleaning up the dataset (to avoid reaching the limit of 5 million rows, but you can't delete "some" of the rows, only to truncate the whole dataset) or to make it basicFIFO and lower the limit to 200k rows.
However a better solution will be to automate the import of these CSV files to some database and make the report read the data from there. For example import these files into Azure SQL Database or Data Bricks, and use this as a data source for your report. You can then schedule the refresh of this dataset (in case you use imported) or use Direct Query.
Upvotes: 1