Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.