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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

The sample for Create a Dataset with the API is messed up.

The sample code for creating a dataset with the API  isn't working, giving all kinds of error messages.

 

Page:

http://docs.powerbi.apiary.io/#reference/datasets/datasets-collection/create-a-dataset?console=1

 

It has been changed from what it should be.

 

It should be:

 

{"name": "SalesMarketing","tables":
[{"name": "Product", "columns":
[{ "name": "ProductID", "dataType": "Int64"},
{ "name": "Name", "dataType": "string"},
{ "name": "Category", "dataType": "string"},
{ "name": "IsCompete", "dataType": "bool"},
{ "name": "ManufacturedOn", "dataType": "DateTime"}
]
}
]
}

 

And now it says:

 

{
"name": "PushAdvanced",
"defaultMode" : "PushStreaming",
"tables": [
{
"name": "Date",
"columns": [
{
"name": "Date",
"dataType": "dateTime",
"formatString": "dddd\\, mmmm d\\, yyyy",
"summarizeBy": "none"
}
]
},
{
"name": "sales",
"columns": [
{
"name": "Date",
"dataType": "dateTime",
"formatString": "dddd\\, mmmm d\\, yyyy",
"summarizeBy": "none"
},
{
"name": "Sales",
"dataType": "int64",
"formatString": "0",
"summarizeBy": "sum"
}
],
"measures": [
{
"name": "percent to forecast",
"expression": "SUM(sales[Sales])/SUM(forecast[forecast])",
"formatString": "0.00 %;-0.00 %;0.00 %"
}
]
},
{
"name": "forecast",
"columns": [
{
"name": "date",
"dataType": "dateTime",
"formatString": "m/d/yyyy",
"summarizeBy": "none"
},
{
"name": "forecast",
"dataType": "int64",
"formatString": "0",
"summarizeBy": "sum"
}
]
}
],
"relationships": [
{
"name": "2ea345ce-b147-436e-8ac2-9d3c4d82af8d",
"fromTable": "sales",
"fromColumn": "Date",
"toTable": "Date",
"toColumn": "Date",
"crossFilteringBehavior": "bothDirections"
},
{
"name": "5d95f419-e589-4345-9581-6e70670b1bba",
"fromTable": "forecast",
"fromColumn": "date",
"toTable": "Date",
"toColumn": "Date",
"crossFilteringBehavior": "bothDirections"
}
]
}

Status: Declined
Comments
v-haibl-msft
Employee

@AdriaanLB

 

Do you mean that the code in the page is incorrect and needs to be updated? It seems that the page you provided is not Microsoft site but apiary.io. You can try to contact apiary support as below.

 

The sample for Create a Dataset with the API is messed up_1.jpg

 

Best Regards,
Herbert

Vicky_Song
Impactful Individual
Status changed to: Declined