You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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