Python: read sql script and pull data from SQL servers

q_2017_2019 = workingDir +”/2019ProductionUpdate5.sql”
q_2017_2019= open(q_2017_2019, ‘r’)
sql_2019Prod = ” “.join(q_2017_2019.readlines())
q_2017_2019.close()
df_2019Prod =pd.read_sql_query(sql_2019Prod,conn)

Leave a Reply

Your email address will not be published. Required fields are marked *