Endpoint Refresh a Dataset
Name
refresh_dataset
Description
Refreshes a Dataset by ID. [API reference]
Parameters
| Parameter | Required | Options | ||||||
|---|---|---|---|---|---|---|---|---|
|
Name:
Label: Id |
YES | |||||||
|
Name:
Label: WorkspaceId |
|
|||||||
|
Name:
Label: Wait for completion |
|
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| Id |
DT_WSTR
|
nvarchar(36)
|
36 | |
| RequestId |
DT_WSTR
|
nvarchar(36)
|
36 | |
| RefreshType |
DT_WSTR
|
nvarchar(30)
|
30 | |
| Status |
DT_WSTR
|
nvarchar(30)
|
30 | |
| StartTime |
DT_DBTIMESTAMP
|
datetime
|
||
| EndTime |
DT_DBTIMESTAMP
|
datetime
|
||
| ErrorJson |
DT_NTEXT
|
nvarchar(MAX)
|
||
| 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
Refresh a Dataset
| Required Parameters | |
|---|---|
| Id | Fill-in the parameter... |
| Optional Parameters | |
| WorkspaceId | |
| Wait for completion | False |
| Initial wait (ms) | 3000 |
| Status check wait interval (s) | 5 |
| Maximum wait time (s) | 7200 |
| ContineOn404Error | False |
| ContineOnErrorForMessage | True |
| ErrorSubstringToMatch | is already executing |
| EnableRawOutputModeSingleRow | True |
API Destination
API Destination - Power BI
Connect to your Power BI account and retrieve data, refresh datasets, etc.
Power BI
Refresh a Dataset
| Required Parameters | |
|---|---|
| Id | Fill-in the parameter... |
| Optional Parameters | |
| WorkspaceId | |
| Wait for completion | False |
| Initial wait (ms) | 3000 |
| Status check wait interval (s) | 5 |
| Maximum wait time (s) | 7200 |
| ContineOn404Error | False |
| ContineOnErrorForMessage | True |
| ErrorSubstringToMatch | is already executing |
| EnableRawOutputModeSingleRow | True |
ODBC application
Use these SQL queries in your ODBC application data source:
Datasets - Refresh a Dataset (wait for completion)
SELECT *
FROM refresh_dataset
WHERE Id = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'
WITH (WaitForCompletion='True')
-- More info on refreshing a Dataflow:
-- https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset
Datasets - Refresh a Dataset (without waiting to complete)
SELECT *
FROM refresh_dataset
WHERE Id = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'
WITH (WaitForCompletion='False')
-- More info on refreshing a Dataset:
-- https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Datasets - Refresh a Dataset (wait for completion)
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM refresh_dataset
WHERE Id = ''aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee''
WITH (WaitForCompletion=''True'')
-- More info on refreshing a Dataflow:
-- https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset';
EXEC (@MyQuery) AT [LS_TO_POWER_BI_IN_GATEWAY];
Datasets - Refresh a Dataset (without waiting to complete)
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM refresh_dataset
WHERE Id = ''aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee''
WITH (WaitForCompletion=''False'')
-- More info on refreshing a Dataset:
-- https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset';
EXEC (@MyQuery) AT [LS_TO_POWER_BI_IN_GATEWAY];