Skip to content

SNOW-3556267: Fix AttributeError when write_pandas receives list name…#4236

Open
JonathanStefanov wants to merge 3 commits into
snowflakedb:mainfrom
JonathanStefanov:main
Open

SNOW-3556267: Fix AttributeError when write_pandas receives list name…#4236
JonathanStefanov wants to merge 3 commits into
snowflakedb:mainfrom
JonathanStefanov:main

Conversation

@JonathanStefanov
Copy link
Copy Markdown

  1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
    Fixes SNOW-3556267

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
    • If adding any arguments to public Snowpark APIs or creating new public Snowpark APIs, I acknowledge that I have ensured my changes include AST support. Follow the link for more information: AST Support Guidelines
  3. Please describe how your code solves the related issue.

When Session.write_pandas is called with database= and schema= kwargs, _write_modin_pandas_helper builds a list like ["MY_DB", "MY_SCHEMA", "MY_TABLE"] and passes it as name to to_snowflake. The below-threshold path re-routes to the Snowflake backend which unpacks that list correctly. The Parquet path passed the whole list to a function that called .upper() on it.

write_pandas already accepts table_name, schema, and database as separate string arguments. So the #fix splits the list before calling it: last element is always the table name, second-to-last is the schema (if present), first is the database (if 3 parts). Each part is individually converted from Snowflake identifier format to the plain string write_pandas expects.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@JonathanStefanov
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Comment thread src/snowflake/snowpark/modin/plugin/extensions/utils.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants