title: BigQuery | Python | Export data from BigQuery table VIEW
body: <p>This is a simple code to export from Biq Query to Google storage, in CSV format</p>
  
  <pre><code>def export_data():
  
    client = bigquery.Client()
  
    project = 'xxxxx'
    dataset_id = 'xxx'
    table_id = 'xxx'
    bucket_name = 'xxx'
  
    destination_uri = 'gs://{}/{}'.format(bucket_name, 'EXPORT_FILE.csv')
    dataset_ref = client.dataset(dataset_id, project=project)
    table_ref = dataset_ref.table(table_id)
  
    extract_job = client.extract_table(
        table_ref,
        destination_uri,
        # Location must match that of the source table.
        location='EU')  # API request
    extract_job.result()  # Waits for job to complete.
  
    print('Exported {}:{}.{} to {}'.format(
        project, dataset_id, table_id, destination_uri))
  </code></pre>
  
  <p>It works perfectly for general tables, BUT when I try to export data from saved table VIEW, it failed with this error:</p>
  
  <pre><code>BadRequest: 400 Using table xxx:xxx.xxx@123456 is not allowed for this operation because of its type. Try using a different table that is of type TABLE.
  </code></pre>
  
  <p>Does exist any way to export data from table view?</p>
  
  <p>What I'm trying to achieve is, to get the data from BigQuery in CSV format, and upload to Google analytics Product Data </p>