Analysis Services
This connector is used to query Analysis Services models using DAX queries via the ADOMD.NET library.
This connector requires Windows and the ADOMD.NET library (pyadomd + pythonnet).
Connection configuration
| Name | Mandatory | Default | Description |
|---|
| mode | no | oauth | Authentication mode: oauth, pbix |
| server | yes | | Analysis Services server address |
| datasetid | yes | | Dataset ID (in DAX Studio: right-click model name → "Copy Database ID") |
| token | no | | Access token (for token mode) |
| username | no | | Username (for credentials mode) |
| password | no | | Password (for credentials mode) |
| tenantid | no | | Azure AD tenant ID (for spn mode) |
| clientid | no | | Azure AD application client ID (for spn mode) |
| clientsecret | no | | Azure AD application client secret (for spn mode) |
| scope | no | https://analysis.windows.net/powerbi/api/.default | OAuth scope |
Authentication modes
| Mode | Description |
|---|
oauth | Opens a browser login page. Auto-connects for local AS instances |
pbix | Same as oauth, used for local Power BI Desktop models |
Connection example
connections:
myanalysisservices:
type: analysis_services
mode: oauth
server: powerbi://api.powerbi.com/v1.0/myorg/MyWorkspace
dataset_id: my-dataset-id
Test case configuration
| Name | Mandatory | Default | Description |
|---|
| query | yes | | DAX query to execute |
Test case example
Test DAX measure:
source:
type: analysis_services
connection: myanalysisservices
query: |
EVALUATE
SUMMARIZECOLUMNS(
DimProduct[Category],
"Total Sales", [Total Sales]
)
expected:
type: csv
path: ./expected/salesbycategory.csv
Requirements
- Windows OS
- ADOMD.NET library installed (typically at
C:\Program Files\Microsoft.NET\ADOMD.NET\)
pip install pyadomd pythonnet
- For
spn mode: pip install azure-identity