Forum Discussion
Problems on creating a new dataset with Power BI's REST API
- 8 years ago
Hi.
The API you're trying to use creates a datasets that points to Analysis Services.
Your datasource is SQL (Azure).
We don't have support for creating such datasets from the API.
You'll have to move your data to Analysis Services, use the "Push data" API or create the model in PowerBI desktop.
link to the API doc:
https://msdn.microsoft.com/en-us/library/mt203562.aspx
Eli.
Hi I am trying to create dataset using postgres
datasources":[
{
"name":"postgres",
"connectionString":"Data Source=postgresql://localhost/Postgres?user=other&password=secret;Initial Catalog=Postgres;Cube=Model"
}
]
And m getting 202 response in postman but in PowerBi desktop getting issue
"This Data source can not be accessed by data gateway server:"postgresql://localhost/Postgres?user=other&password=secret;"
Same issue with me as well,
even i tried various combinations for the postgres connection string but only 202 is returned instead of 201.
{
"name":"postgres",
"defaultMode":"AsOnPrem",
"tables":
[
{"name": "Postgres","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":[
{
"name":"postgres",
"connectionString":"Server=localhost;Port=5432;Database=postgres;User Id=postgres;Password=root;"
}
]
}
datasources":[
{
"name":"postgres",
"connectionString":"Data Source=postgresql://localhost/Postgres?user=other&password=secret;Initial Catalog=Postgres;Cube=Model"
OR
Data Source=jdbc:postgresql://localhost/Postgres?user=fred&password=secret&ssl=true
}
]
"datasources":[
{
"name":"postgres",
"connectionString":"Provider=ODBC;Data Source=postgresql://localhost/postgres?user=postgres&password=12345&ssl=prefer;Initial Catalog = postgres; Cube=Model;"
}
]
Also no explanation is given any where regarding CUBE, INITIAL CATALOG and Provider Keys regarding postgres connection String.
Please let me know if anyone has come acrossed a solution for this.
- gregorybor7 years agoNew Member
HI,
One should define Tables when Posting Push,PushStreaming or Streaming datasets.
But not when defining AsOnPrem datasets.
Greg.