Dela via


Set-PowerBITable

Updates the metadata and schema for the specified Power BI table.

Syntax

DatasetId (Standard)

Set-PowerBITable
    -Table <Table>
    -DatasetId <Guid>
    [-WorkspaceId <Guid>]
    [-Workspace <Workspace>]
    [<CommonParameters>]

Dataset

Set-PowerBITable
    -Table <Table>
    -Dataset <Dataset>
    [-WorkspaceId <Guid>]
    [-Workspace <Workspace>]
    [<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

Exempel

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.

Parametrar

-Dataset

A dataset where tables are stored.

Parameteregenskaper

Typ:Dataset
Standardvärde:None
Stöder jokertecken:False
DontShow:False

Parameteruppsättningar

Dataset
Position:Named
Obligatorisk:True
Värde från pipeline:True
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

-DatasetId

ID of the dataset where tables are to be stored.

Parameteregenskaper

Typ:Guid
Standardvärde:None
Stöder jokertecken:False
DontShow:False

Parameteruppsättningar

DatasetId
Position:Named
Obligatorisk:True
Värde från pipeline:False
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

-Table

Table to update the schema.

Parameteregenskaper

Typ:Table
Standardvärde:None
Stöder jokertecken:False
DontShow:False

Parameteruppsättningar

(All)
Position:Named
Obligatorisk:True
Värde från pipeline:False
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

-Workspace

Workspace to filter the place where table resides.

Parameteregenskaper

Typ:Workspace
Standardvärde:None
Stöder jokertecken:False
DontShow:False
Alias:Group

Parameteruppsättningar

(All)
Position:Named
Obligatorisk:False
Värde från pipeline:True
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

-WorkspaceId

ID of the workspace to filter the place where table resides.

Parameteregenskaper

Typ:Guid
Standardvärde:None
Stöder jokertecken:False
DontShow:False
Alias:GroupId

Parameteruppsättningar

(All)
Position:Named
Obligatorisk:False
Värde från pipeline:False
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Indata

Microsoft.PowerBI.Common.Api.Datasets.Dataset

Microsoft.PowerBI.Common.Api.Workspaces.Workspace

Utdata

Microsoft.PowerBI.Common.Api.Datasets.Dataset