Skip to content

Commit

Permalink
Saving .asdatabase files as UTF8
Browse files Browse the repository at this point in the history
Files conaining special characters where saved as ANSI when changing impersonation, resulting in weird characters in the output files. UTF8 is now enforced on these writes.
  • Loading branch information
avdbrink committed Apr 23, 2019
1 parent d89b056 commit 153a62d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion BuildSSASTask/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 6
"Patch": 7
},
"demands": [ ],
"minimumAgentVersion": "1.95.0",
Expand Down
4 changes: 2 additions & 2 deletions DeploySSASTask/DeploySSASTask.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ try {
$datasource.ImpersonationInfo.Password = ""
}
}
[Microsoft.AnalysisServices.Tabular.JsonSerializer]::SerializeDatabase($db) | Set-Content $AsDBFilePath
[Microsoft.AnalysisServices.Tabular.JsonSerializer]::SerializeDatabase($db) | Set-Content $AsDBFilePath -Encoding UTF8
}
write-host "Impersonation information is changed on the Multidimensional Server"
}
Expand Down Expand Up @@ -259,7 +259,7 @@ try {
$datasource.Password = ""
}
}
[Microsoft.AnalysisServices.Tabular.JsonSerializer]::SerializeDatabase($db) | Set-Content $AsDBFilePath
[Microsoft.AnalysisServices.Tabular.JsonSerializer]::SerializeDatabase($db) | Set-Content $AsDBFilePath -Encoding UTF8
}
write-host "Impersonation information is changed on the Tabular server"

Expand Down
2 changes: 1 addition & 1 deletion DeploySSASTask/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 6
"Patch": 7
},
"demands": [],
"minimumAgentVersion": "1.95.0",
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
> NOTE: the deployment uses the Management Studio executable Microsoft.AnalysisServices.Deployment.exe Make sure that this is installed on your build agent!
> Currently the Microsoft Hosted Agents DO NOT have Management Studio installed, so deployement from these hosts is unsupported. Setup a self hosted agent with SQL
> Server Managenment Studio installed on it to use the deployment component
> SECURITY WARNING: if you choose to use Windows username and password as impersonation mode the password you supply will be written in plaintext on disk at the deploy agent!
> SECURITY WARNING: if you choose to use Windows username and password as impersonation mode the password you supply will be written in plaintext on disk at the deploy agent!\s\s
> NOTE: When using Impersonation changing capabilities the outputfile that is used to deploy the model is written to disk using UTF8 encoding. If you're model uses some other encoding you might want to skip impersonation settings. (message me if this is a problem, I'll see if I can fix this)

## Contribute
> * Contributions are welcome!
Expand All @@ -42,6 +44,7 @@
> * Upated to use fit in Azure piplines category
> * Added ImpersonationInformation option None, to skip impersonation settings altogether
> * Custom Management Studio location (Microsoft.AnalysisServices.Deployment.exe) for deployment component
> * Forced UTF8 encoding on writing .asdatabase json files to disk after changing impersonation information
## TODO:
> * a Lot!
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifestVersion": 1,
"id": "VSTS-SSAS",
"version": "1.0.6",
"version": "1.0.7",
"name": "SSAS Build & Deploy",
"scopes": [ "vso.work", "vso.work_write" ],
"description": "Extension with Continuous Integration support for SSAS",
Expand Down

0 comments on commit 153a62d

Please sign in to comment.