'Executes a BigQuery extract command to copy data from BigQuery to
Google Cloud Storage. See here:
https://cloud.google.com/bigquery/docs/reference/v2/jobs
For more details about these parameters.
:param source_project_dataset_table: The dotted <dataset>.<table>
BigQuery table to use as the source data.
:type source_project_dataset_table: string
:param destination_cloud_storage_uris: The destination Google Cloud
Storage URI (e.g. gs://some-bucket/some-file.txt). Follows
convention defined here:
https://cloud.google.com/bigquery/exporting-data-from-bigquery#exportingmultiple
:type destination_cloud_storage_uris: list
:param compression: Type of compression to use.
:type compression: string
:param export_format: File format to export.
:type export_format: string
:param field_delimiter: The delimiter to use when extracting to a CSV.
:type field_delimiter: string
:param print_header: Whether to print a header for a CSV file extract.
:type print_header: boolean'

def run_extract(self, source_project_dataset_table, destination_cloud_storage_uris, compression='NONE', export_format='CSV', field_delimiter=',', print_header=True):

    (source_project, source_dataset, source_table) = _split_tablename(table_input=source_project_dataset_table, default_project_id=self.project_id, var_name='source_project_dataset_table')
    configuration = {'extract': {'sourceTable': {'projectId': source_project, 'datasetId': source_dataset, 'tableId': source_table}, 'compression': compression, 'destinationUris': destination_cloud_storage_uris, 'destinationFormat': export_format}}
    if (export_format == 'CSV'):
        configuration['extract']['fieldDelimiter'] = field_delimiter
        configuration['extract']['printHeader'] = print_header
    return self.run_with_configuration(configuration)
