title: Formatting BIGQUERY output for SQL Server-bound CSV
body: <p>I am using Airflow to move a table of data from bigquery to SQL Server.</p>
  
  <p>The logical process is query the table, export to GCS, download local, and BCP into SQL Server.</p>
  
  <pre><code>Export_TABLE_to_GCS = BigQueryToCloudStorageOperator(
      task_id='Export_to_GCS',
      bigquery_conn_id='myconn1',
      source_project_dataset_table='database.dataset.table',
      field_delimiter='~',
      destination_cloud_storage_uris=['gs://dataset/table*.txt'],
      dag=dag
  )
  
  def DownloadFiles(set):
      gcsbucket = 'dataset'
      gcspath = '{}'.format(set)
      gcs = GoogleCloudStorageHook(gcp_conn_id='myconn1')
      gcs.get_conn()
      files = gcs.list(bucket_name=gcsbucket, prefix=gcspath)
      print(files)
      for file in files:
          print('downloading file {}'.format(file))
          gcs.download(gcsbucket, file, Variable.get("temp_directory") + "dataset/{}".format(file))
  
  
  Export_GCS_to_Local = PythonOperator(
      task_id='Download_GCS_Files_to_Local',
      python_callable=DownloadFiles,
      op_kwargs={'set': 'dataset'},
      dag=dag
  )
  
  def bcp_in(set):
      files = []
      for file in glob.glob(Variable.get("temp_directory") + "dataset/{}*.txt".format(set)):
          files.append(file)
      print("LOCAL FILES {}".format(files))
      for file in files:
          print('Importing File {}'.format(file))
          cmd = '/opt/mssql-tools/bin/bcp buyerhero_staging.dbo.{table} IN "{file}" -F2  -U&lt;&lt;USER&gt;&gt; -P&lt;&lt;Password&gt;&gt; -S&lt;&lt;Server&gt;&gt; -t"~" -c'.format(table=set, file=file)
          print(subprocess.check_output(cmd, shell=True).decode("utf-8"))
  
  
  BCP_Import_Files = PythonOperator(
      task_id='BCP_Import_Files_to_DB3_Staging',
      python_callable=bcp_in,
      op_kwargs={'set': 'dataset'},
      dag=dag
  )
  </code></pre>
  
  <p>My problem is ingesting a column with a timestamp dataset.</p>
  
  <p>Examples:</p>
  
  <pre><code>field1
  ---------------
  2020-05-18 18:37:30
  2020-05-18 20:19:11
  2020-05-18 19:30:20
  2020-05-19 08:27:35
  2020-05-18 19:43:12
  </code></pre>
  
  <p>The problem is in the SQL. I created table1 by exporting a timestamp to string using:  </p>
  
  <pre><code>FORMAT_TIMESTAMP('%Y-%m-%d %H:%M:%S', field1) END AS field1
  </code></pre>
  
  <p>The format in the table works, and the table registers <code>string</code>. The table works and outputs in the webui ok. But when I export the table out to a csv, I get this:  </p>
  
  <pre><code>2020-05-18 19:37:00 UTC      &lt;-- notice the UTC
  </code></pre>
  
  <p>How do I get rid of the UTC? I know <code>FORMAT_TIMESTAMP</code> is supposed to output to output to string. What am I missing?</p>