title: GCP Composer/Airflow fails to recognise DAG once function is called
body: <p>I have a function which gets a list of tables from a BigQuery dataset:</p>
  
  <pre><code>def get_table_names(**kwargs):
  
      client = bigquery.Client()
  
      # get source tables
  
      source_tables = []
  
      for table in client.list_tables(
              Template('$project.$dataset').substitute(project=SOURCE_PROJECT, dataset=SOURCE_DATASET)):
  
          if table.table_id.startswith(TABLE_PREFIX):
              source_tables.append(table.table_id)
  
      logging.info(str(len(source_tables)) + ' tables scheduled to move')
  
      return source_tables
  </code></pre>
  
  <p>I was initially calling this function within a task of type <code>PythonOperator</code> and - although I wasn't returning a value - it ran fine, and logged out '524 tables scheduled to move'.</p>
  
  <p>I'm now calling it as part of the dag setup so that I can instantiate tasks for each table (I've not written this part yet):</p>
  
  <pre><code>table_tasks = get_table_names()
  </code></pre>
  
  <p>But as soon as I call it, the Composer/Airflow web interface stops recognising the DAG - it's still listed and if I click the reload icon I get the usual 'fresh as a daisy message', but if I try to go into the DAG I get:</p>
  
  <blockquote>
    <p>DAG "GA360_Replication" seems to be missing</p>
  </blockquote>