Reference

Endpoint Delete a Dataset


Name

delete_dataset

Description

Delete a Dataset by ID. [API reference]

Related Tables

Datasets

Parameters

Parameter Required Options
Name: Id

Label: Id

YES
Name: WorkspaceId

Label: WorkspaceId

Option Value
Default

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_STR varchar(36) 36
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
Id DT_STR varchar(36) 36
Required columns that you need to supply are bolded.

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
Delete a Dataset
Required Parameters
Id Fill-in the parameter...
Optional Parameters
WorkspaceId
ContineOn404Error True
RawOutputDataRowTemplate {Id:'[$Id$]', Status:'Deleted'}
EnableRawOutputModeSingleRow True
SSIS API Source - Read from table or endpoint

API Destination

This Endpoint belongs to the Datasets table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to delete a dataset:

API Destination - Power BI
Connect to your Power BI account and retrieve data, refresh datasets, etc.
Power BI
Datasets
Delete
Required Parameters
Id Fill-in the parameter...
Optional Parameters
WorkspaceId
ContineOn404Error True
RawOutputDataRowTemplate {Id:'[$Id$]', Status:'Deleted'}
EnableRawOutputModeSingleRow True
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Datasets - Delete a Dataset

SELECT *
FROM delete_dataset
WHERE Id = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'

-- More info on deleting a Dataset:
-- https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/delete-dataset

delete_dataset endpoint belongs to Datasets table(s), and can therefore be used via those table(s).

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Datasets - Delete a Dataset

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM delete_dataset
WHERE Id = ''aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee''

-- More info on deleting a Dataset:
-- https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/delete-dataset';

EXEC (@MyQuery) AT [LS_TO_POWER_BI_IN_GATEWAY];

delete_dataset endpoint belongs to Datasets table(s), and can therefore be used via those table(s).