<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Create Dataset from a Postgresql datasource using REST API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Create-Dataset-from-a-Postgresql-datasource-using-REST-API/m-p/3081204#M41257</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a datasource behind gateway for using rest API. Datasource got created. However, now I want to add a table(create a dataset) from the created datasource to use it in a report. However, I am getting the below error from API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "error": {
        "code": "FailedToDeserializeDatasetError",
        "pbi.error": {
            "code": "FailedToDeserializeDatasetError",
            "parameters": {},
            "details": [],
            "exceptionCulprit": 1
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My API request body:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
	"datasources": [
        {
            "gatewayId":"gateway_id",
            "datasourceId": "datasource_id",
            "datasourceType": "PostgreSql",
            "connectionDetails": "{\"server\":\"server_address\",\"database\":\"database_name\"}",
            "credentialType": "Basic",
            "credentialDetails": {
                "privacyLevel": "None",
                "useEndUserOAuth2Credentials": false
            }
        }
    ],
	"defaultMode": "Push",
	"name": "API DS 1",
	"tables": [
        {
            "name":"currency_rates",
            "description": "DS Table 1 Demo API",
            "columns":[
                {
                    "name":"id",
                    "dataType":"Int64"
                },
                {
                    "name":"traded_on",
                    "dataType":"DateTime"
                },
                {
                    "name":"currency_code",
                    "dataType": "string"
                },
                {
                    "name":"close",
                    "dataType": "Double"
                }
            ]
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure what is wrong here.&lt;/P&gt;&lt;P&gt;API Reference:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset-in-group" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset-in-group&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2023 10:03:37 GMT</pubDate>
    <dc:creator>amankhandelwal</dc:creator>
    <dc:date>2023-02-15T10:03:37Z</dc:date>
    <item>
      <title>Create Dataset from a Postgresql datasource using REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Create-Dataset-from-a-Postgresql-datasource-using-REST-API/m-p/3081204#M41257</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a datasource behind gateway for using rest API. Datasource got created. However, now I want to add a table(create a dataset) from the created datasource to use it in a report. However, I am getting the below error from API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "error": {
        "code": "FailedToDeserializeDatasetError",
        "pbi.error": {
            "code": "FailedToDeserializeDatasetError",
            "parameters": {},
            "details": [],
            "exceptionCulprit": 1
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My API request body:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
	"datasources": [
        {
            "gatewayId":"gateway_id",
            "datasourceId": "datasource_id",
            "datasourceType": "PostgreSql",
            "connectionDetails": "{\"server\":\"server_address\",\"database\":\"database_name\"}",
            "credentialType": "Basic",
            "credentialDetails": {
                "privacyLevel": "None",
                "useEndUserOAuth2Credentials": false
            }
        }
    ],
	"defaultMode": "Push",
	"name": "API DS 1",
	"tables": [
        {
            "name":"currency_rates",
            "description": "DS Table 1 Demo API",
            "columns":[
                {
                    "name":"id",
                    "dataType":"Int64"
                },
                {
                    "name":"traded_on",
                    "dataType":"DateTime"
                },
                {
                    "name":"currency_code",
                    "dataType": "string"
                },
                {
                    "name":"close",
                    "dataType": "Double"
                }
            ]
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure what is wrong here.&lt;/P&gt;&lt;P&gt;API Reference:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset-in-group" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset-in-group&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 10:03:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Create-Dataset-from-a-Postgresql-datasource-using-REST-API/m-p/3081204#M41257</guid>
      <dc:creator>amankhandelwal</dc:creator>
      <dc:date>2023-02-15T10:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create Dataset from a Postgresql datasource using REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Create-Dataset-from-a-Postgresql-datasource-using-REST-API/m-p/3081948#M41266</link>
      <description>&lt;P&gt;The error message "FailedToDeserializeDatasetError" usually indicates that the JSON payload sent to the API is not in the expected format. It's possible that there is a syntax error or some missing information in your request.&lt;/P&gt;&lt;P&gt;Here are a few things you can check:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Make sure the "datasourceId" in your request matches the ID of the datasource you created earlier.&lt;/LI&gt;&lt;LI&gt;Verify that the gateway ID is correct and that the gateway is online and available.&lt;/LI&gt;&lt;LI&gt;Double-check the JSON payload and make sure that all the required fields are included. You can use a JSON validator to check the syntax.&lt;/LI&gt;&lt;LI&gt;Check the Power BI service logs for any additional error messages that may provide more details on the issue.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Wed, 15 Feb 2023 17:28:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Create-Dataset-from-a-Postgresql-datasource-using-REST-API/m-p/3081948#M41266</guid>
      <dc:creator>jaweher899</dc:creator>
      <dc:date>2023-02-15T17:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create Dataset from a Postgresql datasource using REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Create-Dataset-from-a-Postgresql-datasource-using-REST-API/m-p/3082897#M41275</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/447085"&gt;@jaweher899&lt;/a&gt;&amp;nbsp; by PowerBI service logs you meant the one mentioned in this documentation link:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/admin/service-admin-auditing" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/power-bi/admin/service-admin-auditing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or something else?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 08:14:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Create-Dataset-from-a-Postgresql-datasource-using-REST-API/m-p/3082897#M41275</guid>
      <dc:creator>amankhandelwal</dc:creator>
      <dc:date>2023-02-16T08:14:04Z</dc:date>
    </item>
  </channel>
</rss>

