Skip to content

Commit e8cdf5d

Browse files
nanohannohkuepers
andauthored
feat: Add max_file_size to Snowflake config (#5377)
Add max_file_size to Snowflake config Signed-off-by: hkuepers <[email protected]> Co-authored-by: hkuepers <[email protected]>
1 parent 4d58bf4 commit e8cdf5d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

sdk/python/feast/infra/offline_stores/snowflake.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ class SnowflakeOfflineStoreConfig(FeastConfigBaseModel):
130130

131131
convert_timestamp_columns: Optional[bool] = None
132132
""" Convert timestamp columns on export to a Parquet-supported format """
133+
134+
max_file_size: Optional[int] = None
135+
""" Upper size limit (in bytes) of each file that is offloaded. Default: 16777216"""
133136
model_config = ConfigDict(populate_by_name=True)
134137

135138

@@ -616,6 +619,9 @@ def to_remote_storage(self) -> List[str]:
616619
DETAILED_OUTPUT = TRUE
617620
HEADER = TRUE
618621
"""
622+
if (max_file_size := self.config.offline_store.max_file_size) is not None:
623+
query += f"\nMAX_FILE_SIZE = {max_file_size}"
624+
619625
cursor = execute_snowflake_statement(self.snowflake_conn, query)
620626
# s3gov schema is used by Snowflake in AWS govcloud regions
621627
# remove gov portion from schema and pass it to online store upload

0 commit comments

Comments
 (0)