pankajastro commented on code in PR #29735: URL: https://github.com/apache/airflow/pull/29735#discussion_r1116641473
########## airflow/providers/google/cloud/sensors/bigquery.py: ########## @@ -244,3 +247,69 @@ def execute_complete(self, context: dict[str, Any], event: dict[str, str] | None return event["message"] raise AirflowException(event["message"]) raise AirflowException("No event received in trigger callback") + + +class BigQueryTableExistencePartitionAsyncSensor(BigQueryTablePartitionExistenceSensor): + """ + Checks for the existence of a partition within a table in Google BigQuery. + + :param project_id: The Google cloud project in which to look for the table. + The connection supplied to the hook must provide + access to the specified project. + :param dataset_id: The name of the dataset in which to look for the table. + storage bucket. + :param partition_id: The name of the partition to check the existence of. + :param table_id: The name of the table to check the existence of. + :param gcp_conn_id: The connection ID used to connect to Google Cloud. + :param bigquery_conn_id: (Deprecated) The connection ID used to connect to Google Cloud. + This parameter has been deprecated. You should pass the gcp_conn_id parameter instead. + :param delegate_to: The account to impersonate using domain-wide delegation of authority, Review Comment: `delegate_to` has been deprecated so shall we avoid this adding here considering this is a new feature? ########## airflow/providers/google/cloud/sensors/bigquery.py: ########## @@ -244,3 +247,69 @@ def execute_complete(self, context: dict[str, Any], event: dict[str, str] | None return event["message"] raise AirflowException(event["message"]) raise AirflowException("No event received in trigger callback") + + +class BigQueryTableExistencePartitionAsyncSensor(BigQueryTablePartitionExistenceSensor): + """ + Checks for the existence of a partition within a table in Google BigQuery. + + :param project_id: The Google cloud project in which to look for the table. + The connection supplied to the hook must provide + access to the specified project. + :param dataset_id: The name of the dataset in which to look for the table. + storage bucket. + :param partition_id: The name of the partition to check the existence of. + :param table_id: The name of the table to check the existence of. + :param gcp_conn_id: The connection ID used to connect to Google Cloud. + :param bigquery_conn_id: (Deprecated) The connection ID used to connect to Google Cloud. + This parameter has been deprecated. You should pass the gcp_conn_id parameter instead. + :param delegate_to: The account to impersonate using domain-wide delegation of authority, + if any. For this to work, the service account making the request must have + domain-wide delegation enabled. + :param impersonation_chain: Optional service account to impersonate using short-term + credentials, or chained list of accounts required to get the access_token + of the last account in the list, which will be impersonated in the request. + If set as a string, the account must grant the originating account + the Service Account Token Creator IAM role. + If set as a sequence, the identities from the list must grant + Service Account Token Creator IAM role to the directly preceding identity, with first + account from the list granting this role to the originating account (templated). + :param polling_interval_seconds: The interval in seconds to wait between checks table existence. Review Comment: sensors expose `poke_interval ` can we reuse that here? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org