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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Rest API error creating datasets for AzureAS (FailedToDeserializeDatasetError)

I am trying to create a dataset, pointing to an Azure AS model, in Power BI using the REST APIs. I get get the following error:

FailedToDeserializeDatasetError

 

I can successfully create datasets not pointing to an Azure AS model.

 

I use the following post body:

{

"name":"MyTestDataset",
"defaultMode":"AzureAS",
"tables": [],
"datasources":[
{
"name":"dataSource1",
"connectionString":"Data Source=asazure://northeurope.asazure.windows.net/myazureas;Initial Catalog=mydatabase;Cube=Model"
}
]

}

Anyone got this working?

1 ACCEPTED SOLUTION
jppp
MVP

The documentation is not correct related to AAS: https://msdn.microsoft.com/en-us/library/mt203562.aspx 

 

It also should be 'defaultMode':'AsOnPrem' for the Azure Analysis Service instead of AzureAS:

{'name':'AAS','defaultMode':'AsOnPrem','tables':[],'datasources':[{'name':'AAS','connectionString':''}]} 

 

-JP

View solution in original post

3 REPLIES 3
nishhtg
Regular Visitor

Problems on creating a new dataset with Power BI's REST API

  

error for me , getting 202 instead of 201 for dataset creation.

 

this is something wrong with the conenction string for postgres.

as it very difficult to understand and findout exactly what needs to be the structure for a postgres datasource.

 

i have tried various patterns for the connection string with no luck.

 

 "datasources":[
      {
         "name":"postgres",
         "connectionString":"Provider=ODBC;Data Source=postgresql://localhost/postgres?user=postgres&password=12345&ssl=prefer;Initial Catalog = postgres; Cube=Model;"
      }
   ]

 

   "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=jdbcSmiley Tongueostgresql://localhost/Postgres?user=fred&password=secret&ssl=true

                               

      }

   ]

 

Also, the terms CUBE and INITIAL CATALOG, PROVIDER these keys have very less info available on the net for postgres connection string. A detailed explanation for postgres connection string would be helpful here.

jppp
MVP

The documentation is not correct related to AAS: https://msdn.microsoft.com/en-us/library/mt203562.aspx 

 

It also should be 'defaultMode':'AsOnPrem' for the Azure Analysis Service instead of AzureAS:

{'name':'AAS','defaultMode':'AsOnPrem','tables':[],'datasources':[{'name':'AAS','connectionString':''}]} 

 

-JP

Anonymous
Not applicable

Works perfect, thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Kudoed Authors