All docs This doc
Skip to end of metadata
Go to start of metadata


Overview

The following operations allow you to work with rows. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with rows, see Sample configuration

OperationDescription

addGroupRows

Adds rows to dataset in a group.

addRows

Adds rows to a table in a dataset.

deleteGroupRowsDeletes rows from a table of a dataset which is in a group.
deleteRowsDeletes rows from a table in a dataset.

Operation details

This section provides further details on the operations related to rows.

Adding rows to dataset in a group

The addGroupRows operation adds rows to a dataset in a group.

addGroupRows
<powerbi.addGroupRows>
	<groupId>{$ctx:groupId}</groupId>
    <datasetId>{$ctx:datasetId}</datasetId>
    <tableName>{$ctx:tableName}</tableName>
	<rows>{$ctx:rows}</rows>
</powerbi.addGroupRows>
Properties
  • groupId: GUID of the group to use
  • datasetId: GUID of the dataset to use.
  • tableName: Name of table in the dataset.
  • rows: Array of JSON objects which contains column name and column value as row data.
   Sample request

Following is a sample REST/JSON request that can be handled by the addGroupRows operation.

Sample Request for addGroupRows
{
	"apiUrl" : "https://api.powerbi.com",
	"accessToken" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL2FuYWx5c2lzLndpbmRvd3MubmV0L3Bvd2VyYmkvYXBpIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvMGQ4NTE2MGMtNTg5OS00NGNhLWFjYzgtZGIxNTAxYjk5M2I2LyIsImlhdCI6MTQ0NTU5NDYzOCwibmJmIjoxNDQ1NTk0NjM4LCJleHAiOjE0NDU1OTg1MzgsInZlciI6IjEuMCIsInRpZCI6IjBkODUxNjBjLTU4OTktNDRjYS1hY2M4LWRiMTUwMWI5OTNiNiIsIm9pZCI6IjU3OWY1YzVmLTU1NjctNGY1NC04ZjJjLTgwM2I5NzExYTA0ZiIsInVwbiI6Imh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-2ddafe46b511",
	"datasetId" : "983983dc-5604-47a0-933f-585ea48e8575",
	"tableName" : "Product",
	"rows" : [
        {"ProductID":1,"Name":"Adjustable Race","Category":"Components","IsCompete":true,"ManufacturedOn":"07/30/2014"},
        {"ProductID":2,"Name":"LL Crankarm","Category":"Components","IsCompete":true,"ManufacturedOn":"07/30/2014"},
        {"ProductID":3,"Name":"HL Mountain Frame - Silver","Category":"Bikes","IsCompete":true,"ManufacturedOn":"07/30/2014"}
    ]
}
Related Power BI documentation

https://msdn.microsoft.com/en-us/library/mt203561.aspx

Adding rows to a table in a dataset

The addRows operation adds rows to a table in a dataset.

addRows
<powerbi.addRows>
    <datasetId>{$ctx:datasetId}</datasetId>
	<tableName>{$ctx:tableName}</tableName>
	<rows>{$ctx:rows}</rows>
</powerbi.addRows>
Properties
  • datasetId: GUID of the dataset to use.
  • tableName: Name of the table in the dataset.
  • rows: Array of JSON objects which contains column name and column value as row data.
   Sample request

Following is a sample REST/JSON request that can be handled by the addRows operation.

Sample Request for addRows
{
	"apiUrl" : "https://api.powerbi.com",
	"accessToken" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL2FuYWx5c2lzLndpbmRvd3MubmV0L3Bvd2VyYmkvYXBpIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvMGQ4NTE2MGMtNTg5OS00NGNhLWFjYzgtZGIxNTAxYjk5M2I2LyIsImlhdCI6MTQ0NTU5NDYzOCwibmJmIjoxNDQ1NTk0NjM4LCJleHAiOjE0NDU1OTg1MzgsInZlciI6IjEuMCIsInRpZCI6IjBkODUxNjBjLTU4OTktNDRjYS1hY2M4LWRiMTUwMWI5OTNiNiIsIm9pZCI6IjU3OWY1YzVmLTU1NjctNGY1NC04ZjJj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TA",
	"datasetId" : "b252f775-c9a1-4a80-b90a-2228a4a83b4d",
	"tableName" : "product",
	"rows" : [
        {"ProductID":1,"Name":"Adjustable Race","Category":"Components","IsCompete":true,"ManufacturedOn":"07/30/2014"},
        {"ProductID":2,"Name":"LL Crankarm","Category":"Components","IsCompete":true,"ManufacturedOn":"07/30/2014"},
        {"ProductID":3,"Name":"HL Mountain Frame - Silver","Category":"Bikes","IsCompete":true,"ManufacturedOn":"07/30/2014"}
    ]
}
Related Power BI documentation

https://msdn.microsoft.com/en-us/library/mt203561.aspx

Deleting rows from a table of a dataset which is in a group

The deleteGroupRows operation deletes rows from a table of a dataset which is in a group.

deleteGroupRows
<powerbi.deleteGroupRows>
    <groupId>{$ctx:groupId}</groupId>
    <datasetId>{$ctx:datasetId}</datasetId>
	<tableName>{$ctx:tableName}</tableName>
</powerbi.deleteGroupRows>
Properties
  • groupId: GUID of the group to use.
  • datasetId: GUID of the dataset to use.
  • tableName: Name of table in the dataset.
   Sample request

Following is a sample REST/JSON request that can be handled by the deleteGroupRows operation.

Sample Request for deleteGroupRows
{
	"apiUrl" : "https://api.powerbi.com",
	"accessToken" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL2FuYWx5c2lzLndpbmRvd3MubmV0L3Bvd2VyYmkvYXBpIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvMGQ4NTE2MGMtNTg5OS00NGNhLWFjYzgtZGIxNTAxYjk5M2I2LyIsImlhdCI6MTQ0NTU5NDYzOCwibmJmIjoxNDQ1NTk0NjM4LCJleHAiOjE0NDU1OTg1MzgsInZlciI6IjEuMCIsInRpZCI6IjBkODUxNjBjLTU4OTktNDRjYS1hY2M4LWRiMTUwMWI5OTNiNiIsIm9pZCI6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cIjIYibicRjYVYD0c9q2mSyS6sE9L4VWdTA",
	"groupId" : "fda86e48-d7c3-413a-a8b1-2ddafe46b511",
	"datasetId" : "983983dc-5604-47a0-933f-585ea48e8575",
	"tableName" : "Product"
}
Related Power BI documentation

https://msdn.microsoft.com/en-us/library/mt238041.aspx

Deleting rows from a table in a dataset

The deleteRows operation deletes rows from a table in a dataset.

deleteRows
<powerbi.deleteRows>
    <datasetId>{$ctx:datasetId}</datasetId>
	<tableName>{$ctx:tableName}</tableName>
</powerbi.deleteRows>
Properties
  • datasetId: GUID of the dataset to use.
  • tableName: Name of the table in the dataset.
   Sample request

Following is a sample REST/JSON request that can be handled by the deleteRows operation.

Sample Request for deleteRows
{
	"apiUrl" : "https://api.powerbi.com",
	"accessToken" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL2FuYWx5c2lzLndpbmRvd3MubmV0L3Bvd2VyYmkvYXBpIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvMGQ4NTE2MGMtNTg5OS00NGNhLWFjYzgtZGIxNTAxYjk5M2I2LyIsImlhdCI6MTQ0NTU5NDYzOCwibmJmIjoxNDQ1NTk0NjM4LCJleHAiOjE0NDU1OTg1MzgsInZlciI6IjEuMCIsInRpZCI6IjBkODUxNjBjLTU4OTktNDRjYS1hY2M4LWRiMTUwMWI5OTNiNiIsIm9pZCI6IjU3OWY1YzVmLTU1NjctNGY1NC04ZjJjLTgwM2I5NzExYTA0ZiIsInVwbiI6ImhzZWthbmF5YWtlQFZpcnR1c2EuY29tIiwicHVpZCI6IjEwMDMzRkZGOENBODY3ODciLCJzdWIiOiIzZEhYSXVSdUR4QjlabXN1Y0VKTm5jeElLLXJvdDcxUWh1aFQxZHVFX3JZIiwiZ2l2ZW5fbmFtZSI6IkhhcmluZGEiLCJmYW1pbHlfbmFtZSI6IkVrYW5heWFrZSIsIm5hbWUiOiJIYXJpbmRhIEVrYW5heWFrZSIsImFtciI6WyJ3aWEiXSwidW5pcXVlX25hbWUiOiJoc2VrYW5heWFrZUBWaXJ0dXNhLmNvbSIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0xOTM1NjU1Njk3LTIxMzk4NzE5OTUtNjgyMDAzMzMwLTE5Mjg4NSIsImFwcGlkIjoiMmY4M2JiYTgtOGU3Ni00ODM2LTk2NDktYmJjOWJlYTExZjMyIiwiYXBwaWRhY3IiOiIxIiwic2NwIjoiQ29udGVudC5DcmVhdGUgRGFzaGJvYXJkLlJlYWQuQWxsIERhdGEuQWx0ZXJfQW55IERhdGFzZXQuUmVhZC5BbGwgRGF0YXNldC5SZWFkV3JpdGUuQWxsIEdyb3VwLlJlYWQuQWxsIE1ldGFkYXRhLlZpZXdfQW55IiwiYWNyIjoiMSIsImlwYWRkciI6IjIwMy42Mi4xNzUuNCJ9.fv3ErVcHqb2KRiNsiQ2k2RImcxnCNKmzCMe2Na1_4MTEnDkpmBujqDMsAqzmDdV4fYUFwLKeXD7WSUCa2ftsYDz17j-7EI726b8HbuGemfhjirCRb0n-NQVNmUt2JiMfbF_8LmFO8hnf_Hqer6Coyf9YKWUhkm93kPBgZiZWGOIy2f6yevH2cHqe7wt1HWTmr73x2UhF1fHnkVtR1rflMaajYd4Z9BfWNxj87rwg44FxZkYTYeqOHXOdwyy42-H-wXMUfFwn7RA0zAyKToPrtoADr7qIjBw8dXc9NOyermuh9XfEZMqcIjIYibicRjYVYD0c9q2mSyS6sE9L4VWdTA",
	"datasetId" : "b252f775-c9a1-4a80-b90a-2228a4a83b4d",
	"tableName" : "Product"
}
Related Power BI documentation

https://msdn.microsoft.com/en-us/library/mt238041.aspx

Sample configuration

Following is a sample proxy service that illustrates how to connect to Power BI with the init operation and use the addGroupRows operation. The sample request for this proxy can be found in the addGroupRows sample request.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="powerbi_addGroupRows" transports="https,http" statistics="disable"
   trace="disable" startOnLoad="true">
   <target>
      <inSequence>
         <property name="apiUrl" expression="json-eval($.apiUrl)" />
         <property name="accessToken" expression="json-eval($.accessToken)" />
         <property name="groupId" expression="json-eval($.groupId)" />
         <property name="datasetId" expression="json-eval($.datasetId)" />
         <property name="tableName" expression="json-eval($.tableName)" />
         <property name="rows" expression="json-eval($.rows)" />
         <powerbi.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <accessToken>{$ctx:accessToken}</accessToken>
         </powerbi.init>
         <powerbi.addGroupRows>
			<groupId>{$ctx:groupId}</groupId>
            <datasetId>{$ctx:datasetId}</datasetId>
            <tableName>{$ctx:tableName}</tableName>
            <rows>{$ctx:rows}</rows>
         </powerbi.addGroupRows>
         <respond />
      </inSequence>
      <outSequence>
         <send />
      </outSequence>
   </target>
   <description />
</proxy>  
  • No labels