File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 49
49
from google .api_core import retry as retries
50
50
51
51
from google .cloud .bigquery import job
52
+ import google .cloud .bigquery .job .query
52
53
import google .cloud .bigquery .query
53
54
from google .cloud .bigquery import table
54
55
import google .cloud .bigquery .retry
@@ -667,6 +668,16 @@ def _wait_or_cancel(
667
668
the job.
668
669
"""
669
670
try :
671
+ callback (
672
+ QueryReceivedEvent (
673
+ billing_project = job .project ,
674
+ location = job .location ,
675
+ job_id = job .job_id ,
676
+ statement_type = job .statement_type ,
677
+ state = job .state ,
678
+ query_plan = job .query_plan ,
679
+ )
680
+ )
670
681
query_results = job .result (
671
682
page_size = page_size ,
672
683
max_results = max_results ,
@@ -710,6 +721,18 @@ class QueryFinishedEvent:
710
721
slot_millis : Optional [int ]
711
722
712
723
724
+ @dataclasses .dataclass (frozen = True )
725
+ class QueryReceivedEvent :
726
+ """Query received and acknowledged by the BigQuery API."""
727
+
728
+ billing_project : str
729
+ location : Optional [str ]
730
+ job_id : Optional [str ]
731
+ statement_type : Optional [str ]
732
+ state : Optional [str ]
733
+ query_plan : Optional [list [google .cloud .bigquery .job .query .QueryPlanEntry ]]
734
+
735
+
713
736
@dataclasses .dataclass (frozen = True )
714
737
class QuerySentEvent :
715
738
"""Query sent to BigQuery."""
You can’t perform that action at this time.
0 commit comments