SNOW-2912540: inline _create_temp_stage and _create_temp_file_format into analyzer_utils - #4308
Open
sfc-gh-fpawlowski wants to merge 3 commits into
Conversation
2 tasks
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Aug 6, 2026
3 tasks
sfc-gh-fpawlowski
marked this pull request as ready for review
August 17, 2026 17:58
sfc-gh-fpawlowski
requested review from
sfc-gh-aling,
sfc-gh-bkogan and
sfc-gh-jzeng
and removed request for
a team
August 17, 2026 17:58
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## SNOW-2912540-remove-connector-shims #4308 +/- ##
=======================================================================
- Coverage 95.46% 95.34% -0.13%
=======================================================================
Files 171 171
Lines 44719 44758 +39
Branches 7676 7678 +2
=======================================================================
- Hits 42693 42673 -20
- Misses 1253 1306 +53
- Partials 773 779 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sfc-gh-fpawlowski
force-pushed
the
SNOW-2912540-remove-connector-shims
branch
from
August 20, 2026 16:27
b14c893 to
74db794
Compare
sfc-gh-fpawlowski
force-pushed
the
SNOW-2912540-inline-pandas-staging-helpers
branch
from
August 20, 2026 16:27
45cd333 to
eaa97e3
Compare
…into analyzer_utils Removes the dependency on these private snowflake-connector-python functions (previously imported from connector.pandas_tools). Ports the implementation from universal-driver PR #518 directly into Snowpark so the connector no longer needs to expose staging helpers as part of its public surface. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ned pandas staging helpers black never ran on the ported code (4 blocks needed line-wrapping). The two cursor.execute(..., _force_qmark_paramstyle=True) calls also fail pyright: SnowflakeCursor.execute's two @overload stubs in snowflake-connector-python never declare _force_qmark_paramstyle, only the real implementation signature does. That gap was invisible while this code lived in the connector package; porting it into analyzer_utils.py exposes it to Snowpark's own pyright run.
…tings _stage_sql (inlined from universal-driver PR #518 in the prior commit) faithfully maps compression="gzip" to COMPRESSION=auto in the generated CREATE...STAGE...FILE_FORMAT SQL, same as it already does for the COPY INTO clause (see copy_compression in this test). The stage-creation assertion still expected the literal "gzip", unlike its COPY INTO counterpart a few lines below which already accounted for the auto mapping via copy_compression. Update it to match.
sfc-gh-fpawlowski
force-pushed
the
SNOW-2912540-inline-pandas-staging-helpers
branch
from
August 21, 2026 08:24
eaa97e3 to
4292ad1
Compare
sfc-gh-fpawlowski
force-pushed
the
SNOW-2912540-remove-connector-shims
branch
from
August 21, 2026 08:24
a592c7d to
b245fcd
Compare
This was referenced Aug 21, 2026
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.

Ports the
_create_temp_stageand_create_temp_file_formatimplementations from the Universal Driver connector (PR snowflake-eng/drivers#518) directly into Snowpark'sanalyzer_utils.py, removing the dependency on these privatesnowflake.connector.pandas_toolssymbols.Changes:
analyzer_utils.py: Remove the three connector imports (_create_temp_stage,_create_temp_file_format,build_location_helper). Add local implementations of all staging helpers:_qualify_name/build_location_helper,_pandas_generate_temp_name,_pandas_create_temp_object,_stage_sql,_file_format_sql,_create_temp_stage,_create_temp_file_format._create_temp_file_formatcall site inwrite_arrow: the local impl maps compression internally (like PR SNOW-667858:to_pandaswill only convertTimestampTypes to a native pandas date format, and notDateTypes #518), so the caller no longer pre-maps viacompression_map[compression].black-format the ported code, and suppress apyrightoverload error on the twocursor.execute(..., _force_qmark_paramstyle=True)calls in_pandas_create_temp_object:_force_qmark_paramstyleis declared only onSnowflakeCursor.execute's real implementation signature in snowflake-connector-python, not on either of its two@overloadstubs — a latent stub gap invisible while this code lived inside the connector package, now exposed since it lives in Snowpark's own pyright-checked source tree.Companion: snowflake-eng/drivers#518 (which implements the same functions in the UD connector for its own
write_pandasflow — the two implementations are kept in sync).Checklist
Stack (via Graphite)
🤖 Generated with Claude Code