Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR bumps ds-platform-utils to 0.4.1 and updates the Snowflake→S3 unload COPY INTO query generation, alongside a small lint-annotation change in the S3-stage loader helper.
Changes:
- Bump package version from
0.4.0to0.4.1(project + lockfile). - Update Snowflake→S3 COPY INTO options to include
INCLUDE_QUERY_ID = TRUE(replacingOVERWRITE = TRUE). - Remove the
# noqa: PLR0913suppression from_copy_s3_to_snowflake.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
uv.lock |
Locks version bump to 0.4.1. |
src/ds_platform_utils/metaflow/s3_stage.py |
Adjusts COPY INTO unload options and modifies lint suppression for a multi-arg function. |
pyproject.toml |
Updates project version to 0.4.1. |
Comments suppressed due to low confidence (2)
src/ds_platform_utils/metaflow/s3_stage.py:80
_generate_snowflake_to_s3_copy_queryreplacedOVERWRITE = TRUEwithINCLUDE_QUERY_ID = TRUE, which changes COPY INTO behavior when exporting to a caller-provideds3_paththat already contains files (previously would overwrite; now default is non-overwrite and may error/leave stale files). Consider keepingOVERWRITE = TRUE(and addingINCLUDE_QUERY_ID = TRUEin addition), or making overwrite configurable via a function parameter so existing callers don’t get a breaking behavior change.
INCLUDE_QUERY_ID = TRUE
FILE_FORMAT = (TYPE = 'parquet')
MAX_FILE_SIZE = {max_file_size}
HEADER = TRUE
DETAILED_OUTPUT = TRUE;
src/ds_platform_utils/metaflow/s3_stage.py:203
- Removing
# noqa: PLR0913from_copy_s3_to_snowflakewill make Ruff flag this function for too many arguments (it currently has 8 parameters, and the repo enables RuffPLrules). Either re-add the noqa (with a short rationale like other functions in the repo), or refactor the signature (e.g., group related options into a config object) to satisfy PLR0913.
def _copy_s3_to_snowflake( # noqa: PLR0913
s3_path: str,
table_name: str,
table_definition: Optional[List[Tuple[str, str]]] = None,
warehouse: Optional[Union[Literal["XS", "MED", "XL"], str]] = None,
use_utc: bool = True,
auto_create_table: bool = False,
overwrite: bool = False,
use_logical_type: bool = True,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace stage overwrite with include_query_id
