Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powerbi 我可以使用power Shell在power BI中创建数据集吗_Powerbi - Fatal编程技术网

Powerbi 我可以使用power Shell在power BI中创建数据集吗

Powerbi 我可以使用power Shell在power BI中创建数据集吗,powerbi,Powerbi,实际上,我想使用PowerShell创建数据集,假设我不想使用power BI desktop创建数据集和数据源。是的,您可以使用的(与一起使用)或使用Microsoft的官方和cmdlet创建数据集 例如,类似这样的情况: Login-PowerBI $col1 = New-PowerBIColumn -Name ID -DataType Int64 $col2 = New-PowerBIColumn -Name Data -DataType String $table1 = New-Pow

实际上,我想使用PowerShell创建数据集,假设我不想使用power BI desktop创建数据集和数据源。

是的,您可以使用的(与一起使用)或使用Microsoft的官方和cmdlet创建数据集

例如,类似这样的情况:

Login-PowerBI

$col1 = New-PowerBIColumn -Name ID -DataType Int64
$col2 = New-PowerBIColumn -Name Data -DataType String
$table1 = New-PowerBITable -Name SampleTable1 -Columns $col1,$col2

$col3 = New-PowerBIColumn -Name ID -DataType Int64
$col4 = New-PowerBIColumn -Name Date -DataType DateTime
$col5 = New-PowerBIColumn -Name Detail -DataType String
$col6 = New-PowerBIColumn -Name Result -DataType Double
$table2 = New-PowerBITable -Name SampleTable2 -Columns $col3,$col4,$col5,$col6

$dataset = New-PowerBIDataSet -Name SampleDataSet -Tables $table1,$table2

Add-PowerBIDataSet -DataSet $dataset

谢谢你的回答。我想连接现有的SQL server数据库并创建数据集。如果您知道模式,只需提供。如果您不知道,则首先必须连接到数据库并读取有关表列的信息,例如从dmv读取。您可以(如果提供了连接信息)或通过编程方式访问它。