Python visuals in Azure Data Studio Notebook connected to Azure DataWarehouse #14568
Unanswered
rozrutskiy
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My Azure Data Studio is connected to corporate DataWarehouse in Azure. Its Authentication Type: Azure Active Directory - Universal with MFA support. I can create Notebooks and run SQL queries, querying any tables in the DW.
I cannot figure out how to run Python to create various visuals over chosen tables in DW? Do I still need to have a connection string like the below? The below sample does not work for me..
I would very much appreciate help with this...
import pyodbc
import pandas
from sklearn.linear_model
import LinearRegression
from sklearn.metrics import mean_squared_error
conn_str = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server}; SERVER=; DATABASE=XXXXXX; UID=;PWD=) query_str = 'SELECT * FROM [GRS].[Participant]'
df = pandas.read_sql(sql=query_str, con=conn_str)
print("Data frame:", df)
Beta Was this translation helpful? Give feedback.
All reactions