Skip to content

BigQuery: Remove "Job ID" metadata on annotaton to avoid cache misses#7541

Merged
yoshiokatsuneo merged 1 commit intogetredash:masterfrom
yoshiokatsuneo:feat/bigquery_annotation_remove_job_id
Sep 24, 2025
Merged

BigQuery: Remove "Job ID" metadata on annotaton to avoid cache misses#7541
yoshiokatsuneo merged 1 commit intogetredash:masterfrom
yoshiokatsuneo:feat/bigquery_annotation_remove_job_id

Conversation

@yoshiokatsuneo
Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Feature

Description

On BigQuery datasource, when "Use Query Annotation" is enabled, BigQuery's query result cache does not owkr because the query sent to BigQuery is always different because the annotation have different "Job ID" on the each query.

This PR fixes the BigQuery caching issue by removing "Job ID" from the query annotation so that the query sent to BigQuery is always the same and the BigQuery cache hits.

How is this tested?

  • Manually

I run the same query twice for the BigQuery data source with Use Query Annotation enabled, and I confirmed that the "data scanned" for the second query is zero.

@yoshiokatsuneo yoshiokatsuneo force-pushed the feat/bigquery_annotation_remove_job_id branch from 6c27887 to 96de324 Compare September 24, 2025 10:16
@yoshiokatsuneo yoshiokatsuneo marked this pull request as ready for review September 24, 2025 10:54
Copy link
Copy Markdown
Collaborator

@eradman eradman left a comment

Choose a reason for hiding this comment

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

Not tested, but this change makes sense to me

@yoshiokatsuneo yoshiokatsuneo merged commit 56c06ad into getredash:master Sep 24, 2025
11 checks passed
@yoshiokatsuneo
Copy link
Copy Markdown
Contributor Author

@eradman
Thank you for the quick review !

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