snowflakedb / snowflakedb/snowpark-python

SNOW-892444: Add better error handling for async processes

Open
#1,004 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
341
Forks
155
Avg merge
4d 16h
Merged PRs (30d)
27

Description

What is the current behavior?

When ever a sql query fails in with an Async job, it will only return a message such as:
snowflake.snowpark.exceptions.SnowparkSQLException: (1304): 01ae4e6b-0004-b4f8-0013-728700ad86ce: 000711 (02000): Query 01ae4e6b-0004-b4f8-0013-728700ad86ca has no result because it failed

What is the desired behavior?

Return the underlying query error message.
SQL compilation error: Object 'TABLETHATDOESNTEXIST' does not exist or not authorized.

How would this improve snowflake-snowpark-python?

It would give meaningful error handling

References, Other Background

sql = "select * from tablethatdoesntexist"
cl = session.sql(sql)
cl = cl.collect_nowait()
df = cl.to_df()
df.show()
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported flow using session.sql, collect_nowait(), to_df(), and df.show() with a missing table query. Start by tracing how the async job reports a failed SQL query. Done means the underlying SQL compilation error, including the missing object message, is returned instead of only the generic no-result error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
data-engineering, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.