preserver version of definition.pbir
This commit is contained in:
Родитель
942285ec9d
Коммит
2adc0a0ba9
|
@ -131,7 +131,6 @@ Function Invoke-FabricAPIRequest {
|
|||
[Parameter(Mandatory = $false)] [string] $contentType = "application/json; charset=utf-8",
|
||||
[Parameter(Mandatory = $false)] [int] $timeoutSec = 240,
|
||||
[Parameter(Mandatory = $false)] [int] $retryCount = 0
|
||||
|
||||
)
|
||||
|
||||
if ([string]::IsNullOrEmpty($authToken)) {
|
||||
|
@ -721,22 +720,36 @@ Function Import-FabricItems {
|
|||
|
||||
if ($datasetReference)
|
||||
{
|
||||
$datasetName = $datasetReference.name
|
||||
# $datasetName = $datasetReference.name
|
||||
|
||||
$datasetId = $datasetReference.id
|
||||
|
||||
$newPBIR = @{
|
||||
"version" = "1.0"
|
||||
"datasetReference" = @{
|
||||
"byConnection" = @{
|
||||
"connectionString" = $null
|
||||
"pbiServiceModelId" = $null
|
||||
"pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
"pbiModelDatabaseName" = "$datasetId"
|
||||
"name" = "EntityDataSource"
|
||||
"connectionType" = "pbiServiceXmlaStyleLive"
|
||||
}
|
||||
}
|
||||
} | ConvertTo-Json
|
||||
$pbirJson.datasetReference.byPath = $null
|
||||
|
||||
$pbirJson.datasetReference.byConnection = @{
|
||||
"connectionString" = $null
|
||||
"pbiServiceModelId" = $null
|
||||
"pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
"pbiModelDatabaseName" = "$datasetId"
|
||||
"name" = "EntityDataSource"
|
||||
"connectionType" = "pbiServiceXmlaStyleLive"
|
||||
}
|
||||
|
||||
$newPBIR = $pbirJson | ConvertTo-Json
|
||||
|
||||
# $newPBIR = @{
|
||||
# "version" = "1.0"
|
||||
# "datasetReference" = @{
|
||||
# "byConnection" = @{
|
||||
# "connectionString" = $null
|
||||
# "pbiServiceModelId" = $null
|
||||
# "pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
# "pbiModelDatabaseName" = "$datasetId"
|
||||
# "name" = "EntityDataSource"
|
||||
# "connectionType" = "pbiServiceXmlaStyleLive"
|
||||
# }
|
||||
# }
|
||||
# } | ConvertTo-Json
|
||||
|
||||
$fileContent = [system.Text.Encoding]::UTF8.GetBytes($newPBIR)
|
||||
|
||||
|
@ -951,19 +964,32 @@ Function Import-FabricItem {
|
|||
throw "Cannot import directly a report using byPath connection. You must first resolve the semantic model id and pass it through the 'itemProperties' parameter."
|
||||
}
|
||||
|
||||
$newPBIR = @{
|
||||
"version" = "1.0"
|
||||
"datasetReference" = @{
|
||||
"byConnection" = @{
|
||||
"connectionString" = $null
|
||||
"pbiServiceModelId" = $null
|
||||
"pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
"pbiModelDatabaseName" = "$datasetId"
|
||||
"name" = "EntityDataSource"
|
||||
"connectionType" = "pbiServiceXmlaStyleLive"
|
||||
}
|
||||
}
|
||||
} | ConvertTo-Json
|
||||
$pbirJson.datasetReference.byPath = $null
|
||||
|
||||
$pbirJson.datasetReference.byConnection = @{
|
||||
"connectionString" = $null
|
||||
"pbiServiceModelId" = $null
|
||||
"pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
"pbiModelDatabaseName" = "$datasetId"
|
||||
"name" = "EntityDataSource"
|
||||
"connectionType" = "pbiServiceXmlaStyleLive"
|
||||
}
|
||||
|
||||
$newPBIR = $pbirJson | ConvertTo-Json
|
||||
|
||||
# $newPBIR = @{
|
||||
# "version" = "1.0"
|
||||
# "datasetReference" = @{
|
||||
# "byConnection" = @{
|
||||
# "connectionString" = $null
|
||||
# "pbiServiceModelId" = $null
|
||||
# "pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
# "pbiModelDatabaseName" = "$datasetId"
|
||||
# "name" = "EntityDataSource"
|
||||
# "connectionType" = "pbiServiceXmlaStyleLive"
|
||||
# }
|
||||
# }
|
||||
# } | ConvertTo-Json
|
||||
|
||||
$fileContent = [system.Text.Encoding]::UTF8.GetBytes($newPBIR)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче