def execute(self, context=None):
     self.log.info('Executing SQL check: %s', self.sql)
     hook = BigQueryHook(
         bigquery_conn_id=self.bigquery_conn_id,
         use_legacy_sql=self.use_legacy_sql,
         delegate_to=self.delegate_to)
     records = hook.get_first(self.sql)
     self.log.info('Record: %s', records)
     branch_to_follow = self.pass_task
     if not records:
         self.log.info('The query returned None')
         branch_to_follow = self.fail_task
     elif not all([bool(r) for r in records]):
         exceptstr = 'Test failed.\nQuery:\n{q}\nResults:\n{r!s}'
         self.log.info(exceptstr.format(q=self.sql, r=records))
         branch_to_follow = self.fail_task
     downstream_tasks = context['task'].downstream_list
     self.log.info('Following branch %s', branch_to_follow)
     self.log.info('Downstream task_ids %s', downstream_tasks)
     skip_tasks = [t for t in downstream_tasks if t.task_id != branch_to_follow]
     if downstream_tasks:
         self.skip(context['dag_run'], context['ti'].execution_date, skip_tasks)