Skip to main content
100%

Get Power Query data source Connection String

✓ Published0🌍 Public
HHugoberry
Last edited Mar 21, 2017
Created on Mar 20, 2017

This example shows how to extract the connection string from a Power Query data source using a Power Query M script. The code first retrieves the name of the embedded database catalog via the `AnalysisServices.Databases` function, then queries the Tabular Model Scripting (TMS) schema using the `AnalysisServices.Database` function with a DMV query against `$system.TMSCHEMA_DATA_SOURCES`. Finally, it returns the `ConnectionString` value from the resulting table, revealing the underlying data source details. The script relies solely on Power Query’s built-in Analysis Services connectors, not external libraries.

AI-generated description

Similar vizzes