The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
Is there any API or any DAX Query through which we can get the database name for ODBC Source type. We tried the Datasource API for Dataset and Gateway both, but in that we are not getting details related to database name for ODBC source as shown below.
Datasource API
We also tried the DAX query as shown below, which is " SELECT * from $SYSTEM.DISCOVER_STORAGE_TABLES" in which we get the Table details and in this we can see database name as a column which contains Database ID but we want name of the database.
DAX Query
Please let us know if there any API or any DAX query to get the database name for ODBC source type only.
Thank you
Hi @ekimakIA
That databaseID is actually the Power BI Database ID and not your ODBC database name.
As mentioned you will need to get this from the API.
Hi @ekimakIA
From your screenshot the table name is below?
Otherwise what about looking at the Gateway API to get all the data sources?
You could then match the datasourceID from the GatewayAPI and match it to the above API?
I have done something similar to this in the past
Hi @GilbertQ ,
We need a database name of the table for ODBC connection. Through Gateway API for datasources we are getting the same result in which it doesn't contain the database name for ODBC connection type. From DAX query, we are getting database id but we are looking for the database name for the highlighted table.
User | Count |
---|---|
40 | |
15 | |
13 | |
11 | |
8 |
User | Count |
---|---|
49 | |
43 | |
23 | |
19 | |
18 |