< Back
Set-PowerBITable
Post
NAME Set-PowerBITable
SYNOPSIS
Updates the metadata and schema for the specified Power BI table.
SYNTAX
Set-PowerBITable -Dataset <Dataset> -Table <Table> [-Workspace <Workspace>] [-WorkspaceId <Guid>]
[<CommonParameters>]
Set-PowerBITable -DatasetId <Guid> -Table <Table> [-Workspace <Workspace>] [-WorkspaceId <Guid>]
[<CommonParameters>]
DESCRIPTION
Updates the metadata and schema for the specified Power BI table. Before you run this command, make sure you log
in using Connect-PowerBIServiceAccount
PARAMETERS
-Dataset <Dataset>
A dataset where tables are stored.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-DatasetId <Guid>
ID of the dataset where tables are to be stored.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Table <Table>
Table to update the schema.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Workspace <Workspace>
Workspace to filter the place where table resides.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-WorkspaceId <Guid>
ID of the workspace to filter the place where table resides.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
Microsoft.PowerBI.Common.Api.Datasets.Dataset
Microsoft.PowerBI.Common.Api.Workspaces.Workspace
OUTPUTS
Microsoft.PowerBI.Common.Api.Datasets.Dataset
NOTES
-------------------------- Example 1 --------------------------
$currentTables = Get-PowerBITable -DatasetId c47f6cff-70de-4837-a094-93a6f26e20bf
$currentTable = $currentTables[0]
$col1 = New-PowerBIColumn -Name Col1 -DataType Int64
$col2 = New-PowerBIColumn -Name Col2 -DataType String
$updatedTable = New-PowerBITable -Name $currentTable.Name -Columns $col1,$col2
Set-PowerBITable -Table $updatedTable -DatasetId c47f6cff-70de-4837-a094-93a6f26e20bf
This example retrieves current table and create new one from the table. Then, it updates the table schema.
RELATED LINKS
SYNOPSIS
Updates the metadata and schema for the specified Power BI table.
SYNTAX
Set-PowerBITable -Dataset <Dataset> -Table <Table> [-Workspace <Workspace>] [-WorkspaceId <Guid>]
[<CommonParameters>]
Set-PowerBITable -DatasetId <Guid> -Table <Table> [-Workspace <Workspace>] [-WorkspaceId <Guid>]
[<CommonParameters>]
DESCRIPTION
Updates the metadata and schema for the specified Power BI table. Before you run this command, make sure you log
in using Connect-PowerBIServiceAccount
PARAMETERS
-Dataset <Dataset>
A dataset where tables are stored.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-DatasetId <Guid>
ID of the dataset where tables are to be stored.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Table <Table>
Table to update the schema.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Workspace <Workspace>
Workspace to filter the place where table resides.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-WorkspaceId <Guid>
ID of the workspace to filter the place where table resides.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
Microsoft.PowerBI.Common.Api.Datasets.Dataset
Microsoft.PowerBI.Common.Api.Workspaces.Workspace
OUTPUTS
Microsoft.PowerBI.Common.Api.Datasets.Dataset
NOTES
-------------------------- Example 1 --------------------------
$currentTables = Get-PowerBITable -DatasetId c47f6cff-70de-4837-a094-93a6f26e20bf
$currentTable = $currentTables[0]
$col1 = New-PowerBIColumn -Name Col1 -DataType Int64
$col2 = New-PowerBIColumn -Name Col2 -DataType String
$updatedTable = New-PowerBITable -Name $currentTable.Name -Columns $col1,$col2
Set-PowerBITable -Table $updatedTable -DatasetId c47f6cff-70de-4837-a094-93a6f26e20bf
This example retrieves current table and create new one from the table. Then, it updates the table schema.
RELATED LINKS