Skip to content

fix(snowflake): log check_query_output response via format string#67848

Open
michaelneely wants to merge 1 commit into
apache:mainfrom
michaelneely:fix-snowflakesqlapihook-check-query-output
Open

fix(snowflake): log check_query_output response via format string#67848
michaelneely wants to merge 1 commit into
apache:mainfrom
michaelneely:fix-snowflakesqlapihook-check-query-output

Conversation

@michaelneely
Copy link
Copy Markdown

Error:SnowflakeSqlApiHook.check_query_output logs the raw response dict, which violates StructuredLogMessage.event's str type.

This prevents logs from being displayed in the UI after a deferred SnowflakeSqlApiOperator finishes executing:

1 validation error for StructuredLogMessage
event
  Input should be a valid string [type=string_type, input_value={'resultSetMetaData': {'n...eatedOn': 1780320202371}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.13/v/string_type

Fix: Log the query response JSON in a templated string, matching the pattern used by other methods in the file.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@michaelneely michaelneely requested a review from potiuk as a code owner June 1, 2026 14:30
@boring-cyborg boring-cyborg Bot added area:providers provider:snowflake Issues related to Snowflake provider labels Jun 1, 2026
@boring-cyborg
Copy link
Copy Markdown

boring-cyborg Bot commented Jun 1, 2026

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@michaelneely michaelneely force-pushed the fix-snowflakesqlapihook-check-query-output branch from 1d32130 to 2f50c84 Compare June 1, 2026 14:33
Copy link
Copy Markdown
Contributor

@henry3260 henry3260 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:snowflake Issues related to Snowflake provider ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants