I’m trying to run the following code (some of the stuff I blind, like the passwords)to get some Snowflake data into a Jupyter notebook:
import math as math
import numpy as np;
import pandas as pd;
import matplotlib.pyplot as plt;
import seaborn as sns;
import snowflake
from sqlalchemy import create_engine
from snowflake.sqlalchemy import URL;
url = URL(account = 'x'
,user = '[email protected]'
,database = 'x'
,warehouse= 'x'
,password= 'xx'
,role = 'x');
HL_Aud_tseries= "select * from RAW.WORKSPACE__ANALYST.TSP_FILE_HL_AUD_CORR_TEST_JAJ;"
engine = create_engine(url);
con = engine.connect();
with engine.connect() as conn:
HL_AUD = pd.read_sql(
sql=HL_Aud_tseries,
con=conn.connection
)
This gives me the following error:
/var/folders/mv/kmklxh114b136cc_j8d65vl00000gn/T/ipykernel_78417/3931250517.py:3: UserWarning: pandas only supports SQLAlchemy connectable (engine/connection) or database string URI or sqlite3 DBAPI2 connection. Other DBAPI2 objects are not tested. Please consider using SQLAlchemy.
HL_AUD = pd.read_sql(
I thought I was using SQLAlchemy!!!! Please advise and thanks in advance!
jajastrzemb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.