< Back

Export-PBIDesktopToSQL

Sat Jan 18, 2020 8:40 pm

NAME Export-PBIDesktopToSQL



SYNOPSIS

A way to export all your Power BI Desktop model tables into a SQL Server Database





SYNTAX

Export-PBIDesktopToSQL [-pbiDesktopWindowName] <String> [[-tables] <String[]>] [[-destinationTables] <String[]>]

[-sqlConnStr] <String> [[-sqlSchema] <String>] [[-forceDataTypes] <Hashtable>] [<CommonParameters>]





DESCRIPTION

A way to export all your Power BI Desktop model tables into a SQL Server Database





PARAMETERS

-pbiDesktopWindowName <String>

Power BI Desktop window name, wildcards can be used. Ex: "*name*"



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-tables <String[]>

The tables to be exported - if empty all the tables get exported



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-destinationTables <String[]>



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-sqlConnStr <String>

The SQL Server connection string



Required? true

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-sqlSchema <String>

The target sql server schema where all the tables will be created (if not exists)



Required? false

Position? 5

Default value dbo

Accept pipeline input? false

Accept wildcard characters? false



-forceDataTypes <Hashtable>



Required? false

Position? 6

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:\\>Export-PBIDesktopToSQL -pbiDesktopWindowName "*Van Arsdel*" -sqlConnStr "Data Source=.\\sql2017; Initial

Catalog=Dummy; Integrated Security=true" -sqlSchema "stg" -Verbose















RELATED LINKS