File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,11 @@ def configuration_schema(cls):
156
156
"secret" : ["jsonKeyFile" ],
157
157
}
158
158
159
+ def annotate_query (self , query , metadata ):
160
+ # Remove "Job ID" before annotating the query to avoid cache misses
161
+ metadata = {k : v for k , v in metadata .items () if k != "Job ID" }
162
+ return super ().annotate_query (query , metadata )
163
+
159
164
def _get_bigquery_service (self ):
160
165
socket .setdefaulttimeout (settings .BIGQUERY_HTTP_TIMEOUT )
161
166
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def test_annotate_query_with_use_query_annotation_option(self):
20
20
query = "SELECT a FROM tbl"
21
21
expect = (
22
22
"/* Username: username, query_id: adhoc, "
23
- "Job ID: job-id, Query Hash: query-hash, "
23
+ "Query Hash: query-hash, "
24
24
"Scheduled: False */ SELECT a FROM tbl"
25
25
)
26
26
You can’t perform that action at this time.
0 commit comments