Endpoint Create a Push Dataset
Name
create_push_dataset
Description
Creates a Push Dataset with Tables. [API reference]
Parameters
Parameter | Required | Options | ||||
---|---|---|---|---|---|---|
Name:
Label: Definition JSON describing the created Dataset and its Tables |
YES |
|
||||
Name:
Label: WorkspaceId |
|
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
---|---|---|---|---|
Id |
DT_STR
|
varchar(36)
|
36 | |
Name |
DT_WSTR
|
nvarchar(150)
|
150 | |
Status |
DT_WSTR
|
nvarchar(30)
|
30 | |
HttpStatusCode |
DT_I4
|
int
|
If the column you are looking for is missing, consider customizing Power BI Connector.
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Examples
SSIS
Use Power BI Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
API Source - Power BI
Connect to your Power BI account and retrieve data, refresh datasets, etc.
Power BI
Create a Push Dataset
Required Parameters | |
---|---|
Definition | Fill-in the parameter... |
Optional Parameters | |
WorkspaceId |

API Destination
API Destination - Power BI
Connect to your Power BI account and retrieve data, refresh datasets, etc.
Power BI
Create a Push Dataset
Required Parameters | |
---|---|
Definition | Fill-in the parameter... |
Optional Parameters | |
WorkspaceId |

ODBC application
Use these SQL queries in your ODBC application data source:
Datasets - Create a Push Dataset
SELECT *
FROM create_push_dataset
WITH (Definition='{
"name": "My Push Dataset Name",
"defaultMode": "Push",
"tables": [
{
"name": "Products",
"columns": [
{
"name": "Id",
"dataType": "Int64"
},
{
"name": "Name",
"dataType": "string"
},
{
"name": "Category",
"dataType": "string"
},
{
"name": "IsComplete",
"dataType": "bool"
},
{
"name": "ManufacturedOn",
"dataType": "DateTime"
},
{
"name": "Sales",
"dataType": "Int64",
"formatString": "Currency"
},
{
"name": "Price",
"dataType": "Double",
"formatString": "Currency"
}
]
}
]
}'
)
-- More info on creating a Push Dataset:
-- https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset
Datasets - Create a Push Dataset with 2 Tables
SELECT *
FROM create_push_dataset
WITH (Definition='{
"name": "My Push Dataset Name",
"defaultMode": "Push",
"tables": [
{
"name": "Customers",
"columns": [
{
"name": "Id",
"dataType": "Int64"
},
{
"name": "Name",
"dataType": "string"
}
]
},
{
"name": "Products",
"columns": [
{
"name": "Id",
"dataType": "Int64"
},
{
"name": "Name",
"dataType": "string"
},
{
"name": "Category",
"dataType": "string"
},
{
"name": "IsComplete",
"dataType": "bool"
},
{
"name": "ManufacturedOn",
"dataType": "DateTime"
},
{
"name": "Sales",
"dataType": "Int64",
"formatString": "Currency"
},
{
"name": "Price",
"dataType": "Double",
"formatString": "Currency"
}
]
}
]
}'
)
-- More info on creating a Push Dataset:
-- https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Datasets - Create a Push Dataset
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM create_push_dataset
WITH (Definition=''{
"name": "My Push Dataset Name",
"defaultMode": "Push",
"tables": [
{
"name": "Products",
"columns": [
{
"name": "Id",
"dataType": "Int64"
},
{
"name": "Name",
"dataType": "string"
},
{
"name": "Category",
"dataType": "string"
},
{
"name": "IsComplete",
"dataType": "bool"
},
{
"name": "ManufacturedOn",
"dataType": "DateTime"
},
{
"name": "Sales",
"dataType": "Int64",
"formatString": "Currency"
},
{
"name": "Price",
"dataType": "Double",
"formatString": "Currency"
}
]
}
]
}''
)
-- More info on creating a Push Dataset:
-- https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset';
EXEC (@MyQuery) AT [LS_TO_POWER_BI_IN_GATEWAY];
Datasets - Create a Push Dataset with 2 Tables
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM create_push_dataset
WITH (Definition=''{
"name": "My Push Dataset Name",
"defaultMode": "Push",
"tables": [
{
"name": "Customers",
"columns": [
{
"name": "Id",
"dataType": "Int64"
},
{
"name": "Name",
"dataType": "string"
}
]
},
{
"name": "Products",
"columns": [
{
"name": "Id",
"dataType": "Int64"
},
{
"name": "Name",
"dataType": "string"
},
{
"name": "Category",
"dataType": "string"
},
{
"name": "IsComplete",
"dataType": "bool"
},
{
"name": "ManufacturedOn",
"dataType": "DateTime"
},
{
"name": "Sales",
"dataType": "Int64",
"formatString": "Currency"
},
{
"name": "Price",
"dataType": "Double",
"formatString": "Currency"
}
]
}
]
}''
)
-- More info on creating a Push Dataset:
-- https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset';
EXEC (@MyQuery) AT [LS_TO_POWER_BI_IN_GATEWAY];