From commits-return-73259-archive-asf-public=cust-asf.ponee.io@airflow.apache.org Wed Oct 30 16:35:34 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 256CC180674 for ; Wed, 30 Oct 2019 17:35:34 +0100 (CET) Received: (qmail 13575 invoked by uid 500); 30 Oct 2019 16:35:33 -0000 Mailing-List: contact commits-help@airflow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.apache.org Delivered-To: mailing list commits@airflow.apache.org Received: (qmail 13562 invoked by uid 99); 30 Oct 2019 16:35:33 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2019 16:35:33 +0000 From: GitBox To: commits@airflow.apache.org Subject: [GitHub] [airflow] kaxil commented on a change in pull request #6470: [AIRFLOW-5817] Improve BigQuery operators idempotency Message-ID: <157245333340.10206.13512357543166194533.gitbox@gitbox.apache.org> Date: Wed, 30 Oct 2019 16:35:33 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit kaxil commented on a change in pull request #6470: [AIRFLOW-5817] Improve BigQuery operators idempotency URL: https://github.com/apache/airflow/pull/6470#discussion_r340728709 ########## File path: airflow/gcp/hooks/bigquery.py ########## @@ -332,19 +332,13 @@ def create_empty_table(self, self.log.info('Creating Table %s:%s.%s', project_id, dataset_id, table_id) - try: - self.service.tables().insert( - projectId=project_id, - datasetId=dataset_id, - body=table_resource).execute(num_retries=num_retries) - - self.log.info('Table created successfully: %s:%s.%s', - project_id, dataset_id, table_id) + self.service.tables().insert( + projectId=project_id, + datasetId=dataset_id, + body=table_resource).execute(num_retries=num_retries) - except HttpError as err: - raise AirflowException( - 'BigQuery job failed. Error was: {}'.format(err.content) - ) + self.log.info('Table created successfully: %s:%s.%s', Review comment: I don't get what changed! We just moved it from hook to operator !! ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services