Last active
March 21, 2017 10:33
-
-
Save Hugoberry/cf72160ea8cb201c41c34524a96e9b9a to your computer and use it in GitHub Desktop.
Get Power Query data source Connection String
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(port as text) => | |
let | |
//Get $Embedded$ database name | |
catalog = AnalysisServices.Databases("localhost:"&port)[Name]{0}, | |
//Run DMV query to get data source details | |
dataSources = AnalysisServices.Database("localhost:"&port,catalog, | |
[Query="select * from $system.TMSCHEMA_DATA_SOURCES"]) | |
in | |
dataSources[ConnectionString]{0} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment