Reference

Endpoint Get Tables


Name

get_tables

Description

Gets a list of Tables of a Dataset

Parameters

Parameter Required Options
Name: DatasetId

Label: DatasetId

Name: WorkspaceId

Label: WorkspaceId

Option Value
Default

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Name DT_WSTR nvarchar(250) 250
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
Get Tables
Optional Parameters
DatasetId
WorkspaceId
EnableCustomReplace 1
SearchFor (?<=(\s*)({|,))(?<QuotedColumn>"\[(?<Column>.+?)\]")(?=:)--regex
ReplaceWith "$4"
SSIS API Source - Read from table or endpoint

API Destination

API Destination - Power BI
Connect to your Power BI account and retrieve data, refresh datasets, etc.
Power BI
Get Tables
Optional Parameters
DatasetId
WorkspaceId
EnableCustomReplace 1
SearchFor (?<=(\s*)({|,))(?<QuotedColumn>"\[(?<Column>.+?)\]")(?=:)--regex
ReplaceWith "$4"
SSIS API Destination - Access table or endpoint

ODBC application

Use these SQL queries in your ODBC application data source:

Tables - Get Tables

SELECT * 
FROM get_tables

Tables - Get Tables in a specified Dataset

SELECT * 
FROM get_tables
WITH (DatasetId='aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee')

SQL Server

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

Tables - Get Tables

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * 
FROM get_tables';

EXEC (@MyQuery) AT [LS_TO_POWER_BI_IN_GATEWAY];

Tables - Get Tables in a specified Dataset

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * 
FROM get_tables
WITH (DatasetId=''aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'')';

EXEC (@MyQuery) AT [LS_TO_POWER_BI_IN_GATEWAY];