< Back

New-PBIDataSet

Sat Jan 18, 2020 8:42 pm

NAME New-PBIDataSet



SYNOPSIS

Create a new DataSet in PowerBI.com





SYNTAX

New-PBIDataSet [[-authToken] <String>] [-dataSet] <Object> [[-defaultRetentionPolicy] <String>] [[-types]

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





DESCRIPTION

Create a new DataSet in PowerBI.Com





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? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-dataSet <Object>

The dataset object, this object must be one of two types: hashtable or System.Data.DataSet



If a hashtable is supplied it must have the following structure:



$dataSet = @{

name = "DataSetName"

; tables = @(

@{

name = "TableName"

; columns = @(

@{ name = "Col1"; dataType = "Int64" }

, @{ name = "Col2"; dataType = "string" }

)

})

}



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-defaultRetentionPolicy <String>

The retention policy to be applied by PowerBI



Example: "basicFIFO"

http://blogs.msdn.com/b/powerbidev/arch ... -data.aspx



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-types <Hashtable>



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ignoreIfDataSetExists [<SwitchParameter>]

Checks if the dataset exists before the creation



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-groupId <String>

Id of the workspace where the reports will get pulled



Required? false

Position? 5

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:\\>New-PBIDataSet -authToken $authToken -dataSet $dataSet



A new dataset will be created and in case of success return the internal dataset id











RELATED LINKS