<?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 Re: Updating Data with Push Push Data Sets in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Updating-Data-with-Push-Push-Data-Sets/m-p/901553#M22011</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately there are some less functionality available for Push DataSet API one of them is update the rows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can find the available functionality for Push DataSet API below&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per that only 2 functionality available for Rows ,either you can add new rows or delete rows&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets/datasets_deleterows" target="_blank" rel="noopener"&gt;Datasets DeleteRows&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets/datasets_postrows" target="_blank" rel="noopener"&gt;Datasets PostRows&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd suggest you to provide this functionality as a new idea in&amp;nbsp; &lt;A href="https://aka.ms/PBI_Comm_Ideas" target="_blank" rel="noopener"&gt;Idea Forum&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2020 05:17:46 GMT</pubDate>
    <dc:creator>Jayendran</dc:creator>
    <dc:date>2020-01-16T05:17:46Z</dc:date>
    <item>
      <title>Updating Data with Push Push Data Sets</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Updating-Data-with-Push-Push-Data-Sets/m-p/898558#M21982</link>
      <description>&lt;P&gt;Hi Everyone&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am a complete NOOB at this, thrown in the deep end on a project. I have followed the tutorial (&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/walkthrough-push-data" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/power-bi/developer/walkthrough-push-data&lt;/A&gt;), and the solution works fine. I tried adding a column to the table (NumberSold) and set the initial value to 1, now I need to update that value to say 5. I cannot find a solution from the API reference, and all my attempts end up with new rows. Searched the forum and cannot see a solution.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I surmise that I will have to delete all the rows and refresh, which could be a problem, given the ultimate size of the dataset, I am being asked to create.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The code is&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;private static void AddRows(string datasetId, string tableName)&lt;BR /&gt;{&lt;BR /&gt;string powerBIApiAddRowsUrl = String.Format("&lt;A href="https://api.powerbi.com/v1.0/myorg/datasets/{0}/tables/{1}/rows" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/datasets/{0}/tables/{1}/rows&lt;/A&gt;", datasetId, tableName);&lt;/P&gt;&lt;P&gt;HttpWebRequest request = System.Net.WebRequest.Create(powerBIApiAddRowsUrl) as System.Net.HttpWebRequest;&lt;BR /&gt;request.KeepAlive = true;&lt;BR /&gt;request.Method = "POST";&lt;BR /&gt;request.ContentLength = 0;&lt;BR /&gt;request.ContentType = "application/json";&lt;/P&gt;&lt;P&gt;//Add token to the request header&lt;BR /&gt;request.Headers.Add("Authorization", String.Format("Bearer {0}", token));&lt;/P&gt;&lt;P&gt;//JSON content for product row&lt;BR /&gt;string rowsJson = "{\"rows\":" +&lt;BR /&gt;"[{\"ProductID\":1,\"Name\":\"Adjustable Race\",\"Category\":\"Components\",\"ManufacturedOn\":\"07/30/2015\",\"NumberSold\":5}," +&lt;BR /&gt;"{\"ProductID\":2,\"Name\":\"LL Crankarm\",\"Category\":\"Components\",\"ManufacturedOn\":\"07/30/2014\",\"NumberSold\":5}," +&lt;BR /&gt;"{\"ProductID\":3,\"Name\":\"HL Mountain Frame - Silver\",\"Category\":\"Bikes\",\"ManufacturedOn\":\"07/30/2014\",\"NumberSold\":5}]}";&lt;/P&gt;&lt;P&gt;//POST web request&lt;BR /&gt;byte[] byteArray = System.Text.Encoding.UTF8.GetBytes(rowsJson);&lt;BR /&gt;request.ContentLength = byteArray.Length;&lt;/P&gt;&lt;P&gt;//Write JSON byte[] into a Stream&lt;BR /&gt;using (Stream writer = request.GetRequestStream())&lt;BR /&gt;{&lt;BR /&gt;writer.Write(byteArray, 0, byteArray.Length);&lt;/P&gt;&lt;P&gt;var response = (HttpWebResponse)request.GetResponse();&lt;/P&gt;&lt;P&gt;Console.WriteLine("Rows Added");&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 22:57:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Updating-Data-with-Push-Push-Data-Sets/m-p/898558#M21982</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-13T22:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Data with Push Push Data Sets</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Updating-Data-with-Push-Push-Data-Sets/m-p/901553#M22011</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately there are some less functionality available for Push DataSet API one of them is update the rows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can find the available functionality for Push DataSet API below&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per that only 2 functionality available for Rows ,either you can add new rows or delete rows&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets/datasets_deleterows" target="_blank" rel="noopener"&gt;Datasets DeleteRows&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets/datasets_postrows" target="_blank" rel="noopener"&gt;Datasets PostRows&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd suggest you to provide this functionality as a new idea in&amp;nbsp; &lt;A href="https://aka.ms/PBI_Comm_Ideas" target="_blank" rel="noopener"&gt;Idea Forum&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 05:17:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Updating-Data-with-Push-Push-Data-Sets/m-p/901553#M22011</guid>
      <dc:creator>Jayendran</dc:creator>
      <dc:date>2020-01-16T05:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Data with Push Push Data Sets</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Updating-Data-with-Push-Push-Data-Sets/m-p/902348#M22018</link>
      <description>&lt;H2&gt;&lt;FONT color="#000000"&gt;Steps to push data into a dataset&lt;/FONT&gt;&lt;/H2&gt;&lt;UL&gt;&lt;LI&gt;Step 1:&amp;nbsp;Register an app with Azure AD&lt;/LI&gt;&lt;LI&gt;Step 2:&amp;nbsp;Get an authentication access token&lt;/LI&gt;&lt;LI&gt;Step 3:&amp;nbsp;Create a dataset in Power BI&lt;/LI&gt;&lt;LI&gt;Step 4:&amp;nbsp;Get a dataset to add rows into a Power BI table&lt;/LI&gt;&lt;LI&gt;Step 5:&amp;nbsp;Add rows to a Power BI table&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;The next section is a general discussion of Power BI API operations that push data.&lt;/FONT&gt;&lt;/P&gt;&lt;H2&gt;&lt;FONT color="#000000"&gt;Power BI API operations to push data&lt;/FONT&gt;&lt;/H2&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;With the Power BI REST API, you can push data sources to Power BI. When an app adds rows to a dataset, dashboard tiles update automatically with the new data. To push data, use the&lt;SPAN&gt; PostDataSet &lt;/SPAN&gt;and&lt;SPAN&gt; PostRows&lt;/SPAN&gt; operations. To find a dataset, use the&lt;SPAN&gt; get DataSet&lt;/SPAN&gt; operation. You can pass a group ID to work with a group for any of these operations. To get a group ID list, use the get groups&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;operation.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Here are the operations to push data into a dataset:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;PostDataset&lt;/LI&gt;&lt;LI&gt;Get Datasets&lt;/LI&gt;&lt;LI&gt;Post Rows&lt;/LI&gt;&lt;LI&gt;Get Groups&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;You create a dataset in Power BI by passing a JavaScript Object Notation (JSON) string to the Power BI service. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;The JSON string for a dataset has the following format:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Power BI Dataset JSON object&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#000000"&gt;{"name": "dataset_name", "tables":
    [{"name": "", "columns":
        [{ "name": "column_name1", "dataType": "data_type"},
         { "name": "column_name2", "dataType": "data_type"},
         { ... }
        ]
      }
    ]
}&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;For our Sales Marketing dataset example, you would pass a JSON string as shown below. In this example,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SalesMarketing&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is the dataset name, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Product&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is the table name. After defining the table, you define the table schema. For the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SalesMarketing&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;dataset, the table schema has these columns: ProductID, Manufacturer, Category, Segment, Product, and IsCompete.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Example dataset object JSON&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#000000"&gt;{
    "name": "SalesMarketing",
    "tables": [
        {
            "name": "Product",
            "columns": [
            {
                "name": "ProductID",
                "dataType": "int"
            },
            {
                "name": "Manufacturer",
                "dataType": "string"
            },
            {
                "name": "Category",
                "dataType": "string"
            },
            {
                "name": "Segment",
                "dataType": "string"
            },
            {
                "name": "Product",
                "dataType": "string"
            },
            {
                "name": "IsCompete",
                "dataType": "bool"
            }
            ]
        }
    ]
}&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I hope this information helps!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Lewis&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Developer&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;A href="https://www.apps4rent.com" target="_blank" rel="noopener"&gt;Apps4rent&lt;/A&gt; | &lt;A href="https://www.o365cloudexperts.com" target="_blank" rel="noopener"&gt;O365CloudExperts&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 15:37:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Updating-Data-with-Push-Push-Data-Sets/m-p/902348#M22018</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-16T15:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Data with Push Push Data Sets</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Updating-Data-with-Push-Push-Data-Sets/m-p/903173#M22023</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp; - I did that, and each data insert, creates a new row. Ended up using a Gateway and refreshing for the historical data, and now looking at streaming for real-time. Thanks for the suggestion.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 09:07:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Updating-Data-with-Push-Push-Data-Sets/m-p/903173#M22023</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-17T09:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Data with Push Push Data Sets</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Updating-Data-with-Push-Push-Data-Sets/m-p/903184#M22024</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100012"&gt;@Jayendran&lt;/a&gt;&amp;nbsp;- Someone asked 3 years ago -&amp;nbsp;&lt;A href="https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/9366600-update-rows-rest-api" target="_blank"&gt;https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/9366600-update-rows-rest-api&lt;/A&gt;&amp;nbsp;- still no movement, even though it was sent for review 3 years ago?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 09:15:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Updating-Data-with-Push-Push-Data-Sets/m-p/903184#M22024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-17T09:15:11Z</dc:date>
    </item>
  </channel>
</rss>

