jwcook23 / mssql_dataframe

Update, Upsert, and Merge from Python dataframes to SQL Server and Azure SQL database.
MIT License
11 stars 4 forks source link

Unable to create local temp table. #7

Open jwcook23 opened 2 years ago

jwcook23 commented 2 years ago

Minimum reproducible example:

from mssql_dataframe import SQLServer

sql = SQLServer(include_metadata_timestamps=True, autoadjust_sql_objects=False)

sql.create.table('#some_local_table', columns={'ColumnA': INT})

# raises SQLTableDoesNotExist
sql_logger.get_schema('#some_local_table')
jwcook23 commented 2 years ago

Creating a global temp table works. Issue is likely because of the pyodbc connection lifecycle within the package.