You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jack (JIRA)" <ji...@apache.org> on 2019/07/30 07:51:00 UTC

[jira] [Commented] (AIRFLOW-2308) Method poll_job_complete in BigQueryBaseCursor class doesn't work outside its class

    [ https://issues.apache.org/jira/browse/AIRFLOW-2308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16895874#comment-16895874 ] 

jack commented on AIRFLOW-2308:
-------------------------------

[~ryan.yuan] have you encountered this?

> Method poll_job_complete in BigQueryBaseCursor class doesn't work outside its class
> -----------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-2308
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2308
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: contrib, gcp
>    Affects Versions: 2.0.0
>            Reporter: Guillermo Rodríguez Cano
>            Priority: Major
>
> We have encountered an strange behaviour in the aforementioned method `poll_job_complete` of the class `BigQueryBaseCursor` when we were create a sensor that should simply poll to check for the completion of a BigQuery job.
> After creating a `BigQueryBaseCursor` object, when we call the method `poll_job_complete` on that object we get the following error: `AttributeError: ‘BigQueryBaseCursor’ object has no attribute ‘poll_job_complete’`.
>  However, if we copy and paste the code contained in the  `poll_job_complete` function to our sensor, it works.
> We are not sure what is the problem exactly or even why...
> Ideally we would want to do something like this, but we get such error:
> {code:java}
> hook = BigQueryHook(bigquery_conn_id=self.bigquery_conn_id, delegate_to=self.delegate_to)
> service = hook.get_service()
> bqCursor = BigQueryBaseCursor(service, self.project_id)
> return bqCursor.poll_job_complete(self.job_id)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)