Extracting lots of data from SQL Server into parquet file efficiently?
I have data in SQL Server and I need to save it in parquet format. Right now I'm using pyodbc and pyarrow libraries for this. As there are serveral million rows, I'm doing it by using queries within a for loop that retrieves chunks of data using a where clause on the SQL server that search for periods in YYYYMM format like 201501, 201502, ..., 202310 and then grouping them together by year and saving it as parquet like example_2023.parquet. The code is: conn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};' 'SERVER=SERVER;' 'DATABASE=DATABASE;' 'UID=USER;' 'PWD=PASS') cursor = conn.cu
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.