Forum Discussion
How to connect to Power BI's datamarts using ADF or Python?
- 2 years ago
Ok, I got confirmation from Microsoft that ADF and Python connection are not supported at the moment. I raised this idea on Microsoft Idea. If you have the same requirement, please help to vote it up. Thanks.
Can you try this one? Connect to and query Azure SQL Database using Python and the pyodbc library - Azure SQL Database | Microsoft Learn
- WeiD2 years agoNew Member
Thanks lbendlin . Yes I tried this previously, but stuck with what values to use for "server name" and "database name" in the Connection string. Because in the SSMS connection, all I need to put in is the Power BI datamart's Connection string (in the form of ".....datamart.fabric.microsoft.com").
Also I had issue with below code.
token_bytes = credential.get_token("https://https://database.windows.net/.default").token.encode("UTF-16-LE")
My initial guess is that PowerBI datamart connection probably needs some specific treatment, comparing to normal Azure SQL Database connection.