Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #28 from newsela/snowflake-chunksize
Browse files Browse the repository at this point in the history
Set default chunksize to the maximum allowed by snowflake
  • Loading branch information
lukeorland committed Mar 23, 2020
2 parents 6e5fd5a + 7153a95 commit 18b5c36
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pandas_ext/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
from sqlalchemy import create_engine


CHUNKSIZE = 16384


def connect(**kwargs):
"""Connect to snowflake.
Expand Down Expand Up @@ -52,6 +55,7 @@ def to_snowflake(
con=None,
index=False,
if_exists='append',
chunksize=CHUNKSIZE,
**kwargs
) -> pd.DataFrame:
"""Sends the current dataframe to snowflake.
Expand All @@ -71,6 +75,7 @@ def to_snowflake(
name=table,
index=index,
if_exists=if_exists,
chunksize=chunksize,
**kwargs
)

Expand Down

0 comments on commit 18b5c36

Please sign in to comment.