Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sdk/python/feast/infra/offline_stores/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ class SnowflakeOfflineStoreConfig(FeastConfigBaseModel):

convert_timestamp_columns: Optional[bool] = None
""" Convert timestamp columns on export to a Parquet-supported format """

max_file_size: Optional[int] = None
""" Upper size limit (in bytes) of each file that is offloaded. Default: 16777216"""
model_config = ConfigDict(populate_by_name=True)


Expand Down Expand Up @@ -616,6 +619,9 @@ def to_remote_storage(self) -> List[str]:
DETAILED_OUTPUT = TRUE
HEADER = TRUE
"""
if (max_file_size := self.config.offline_store.max_file_size) is not None:
query += f"\nMAX_FILE_SIZE = {max_file_size}"

cursor = execute_snowflake_statement(self.snowflake_conn, query)
# s3gov schema is used by Snowflake in AWS govcloud regions
# remove gov portion from schema and pass it to online store upload
Expand Down