< Back

Add-PBITableRows

Sat Jan 18, 2020 8:40 pm

NAME Add-PBITableRows



SYNOPSIS

Add's a collection of rows into a powerbi dataset table in batches





SYNTAX

Add-PBITableRows [-authToken <String>] -dataSetId <String> -tableName <String> -rows <Object> [-batchSize <Int32>]

[-groupId <String>] [<CommonParameters>]



Add-PBITableRows [-authToken <String>] -dataSetName <String> -tableName <String> -rows <Object> [-batchSize

<Int32>] [-groupId <String>] [<CommonParameters>]





DESCRIPTION

Add's a collection of rows into a powerbi dataset table in batches





PARAMETERS

-authToken <String>

The authorization token required to comunicate with the PowerBI APIs

Use 'Get-PBIAuthToken' to get the authorization token string



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-dataSetId <String>

The id of the dataset in PowerBI



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-dataSetName <String>



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-tableName <String>

The name of the table of the dataset



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-rows <Object>

The collection of rows to insert to the table.

This parameter can have it's value from the pipeline



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-batchSize <Int32>

The size of the batch that is sent to PowerBI as HttpPost.



If for example the batch size is 100 and a collection of

1000 rows are being pushed then this cmdlet will make 10

HttpPosts



Required? false

Position? named

Default value 1000

Accept pipeline input? false

Accept wildcard characters? false



-groupId <String>

Id of the workspace where the reports will get pulled



Required? false

Position? named

Default value

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



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Add-PBITableRows -authToken $auth -dataSetId $dataSetId -tableName "Product" -rows $data -batchSize 10













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>1..53 |% { @{id = $_; name = "Product $_"}} | Add-PBITableRows -authToken $auth -dataSetId $dataSetId

-tableName "Product" -batchSize 10



53 records are uploaded to PowerBI "Product" table in batches of 10 rows.











RELATED LINKS