Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hello, following the API reference for the Push Dataset on https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets/datasets_postdataset#datasource I'm trying to write a POST with a dataset that contains a datasource. Using the SalesMarketing and a random CSV as an example I've constructed the following json:
{
"name": "SalesMarketing",
"defaultMode": "Push",
"tables": [
{
"name": "Product",
"columns": [
{
"name": "ProductID",
"dataType": "Int64"
},
{
"name": "Name",
"dataType": "string"
},
{
"name": "Category",
"dataType": "string"
},
{
"name": "IsCompete",
"dataType": "bool"
},
{
"name": "ManufacturedOn",
"dataType": "DateTime"
}
]
}
],
"datasources": [
{
"datasourceType": "Web",
"connectionDetails": {
"url": "https://community.watsonanalytics.com/wp-content/uploads/2015/08/WA_Sales_Products_2012-14.csv"
}
}
]
}Hey Did anyone found the solution yet? I am using same API and datasource is SQL. But don't know how to connect it to sql table instead of manual data entry?
Did you ever figure this out?
I'm also wondering how to configure a datasource. Any luck with this one?
Hi @nlavalle
To get started pushing data into a dataset, see Step 1: Register an app with Azure AD
Step2 get an authentication access token.
Step3 create a dataset in Power BI.
Step4 get a dataset to add rows into a Power BI table.
Step5 get a dataset to add rows into a Power BI table.
Step6 add rows to a Power BI table.
Finally this is the Complete code listing.
Best Regards
Maggie
Hi Maggie,
Yes that is the example I have been following. It works without a datasource defined in the json request body, but that example doesn't include a datasource. I'm wondering what that example code would look like with a datasource included. It would occur during the Step 3, with the "string datasetJson =" line. I've still had no luck finding the proper syntax to include a datasource on the dataset creation.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 16 | |
| 10 | |
| 10 | |
| 8 | |
| 7 |
| User | Count |
|---|---|
| 41 | |
| 36 | |
| 36 | |
| 28 | |
| 20 |