#NEWLINE# def run_copy( self , source_project_dataset_tables , destination_project_dataset_table , write_disposition = 'WRITE_EMPTY' , create_disposition = 'CREATE_IF_NEEDED' ) : #NEWLINE# #INDENT# "\n        Executes a BigQuery copy command to copy data from one BigQuery table\n        to another. See here:\n\n        https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.copy\n\n        For more details about these parameters.\n\n        :param source_project_dataset_tables: One or more dotted\n            (<project>.)<dataset>.<table>\n            BigQuery tables to use as the source data. Use a list if there are\n            multiple source tables.\n            If <project> is not included, project will be the project defined\n            in the connection json.\n        :type source_project_dataset_tables: list|string\n        :param destination_project_dataset_table: The destination BigQuery\n            table. Format is: <project>.<dataset>.<table>\n        :type destination_project_dataset_table: string\n        :param write_disposition: The write disposition if the table already exists.\n        :type write_disposition: string\n        :param create_disposition: The create disposition if the table doesn't exist.\n        :type create_disposition: string\n        " #NEWLINE# source_project_dataset_tables = ( [ source_project_dataset_tables ] if ( not isinstance ( source_project_dataset_tables , list ) ) else source_project_dataset_tables ) #NEWLINE# source_project_dataset_tables_fixup = [ ] #NEWLINE# for source_project_dataset_table in source_project_dataset_tables : #NEWLINE# #INDENT# ( source_project , source_dataset , source_table ) = self . _split_project_dataset_table_input ( 'source_project_dataset_table' , source_project_dataset_table ) #NEWLINE# source_project_dataset_tables_fixup . append ( { #NEWLINE# #INDENT# 'projectId' : source_project , #NEWLINE# 'datasetId' : source_dataset , #NEWLINE# 'tableId' : source_table , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# assert ( 3 == len ( destination_project_dataset_table . split ( '.' ) ) ) , 'Expected destination_project_dataset_table in the format of <project>.<dataset>.<table>. Got: {}' . format ( destination_project_dataset_table ) #NEWLINE# ( destination_project , destination_dataset , destination_table ) = destination_project_dataset_table . split ( '.' , 2 ) #NEWLINE# configuration = { #NEWLINE# #INDENT# 'copy' : { #NEWLINE# #INDENT# 'createDisposition' : create_disposition , #NEWLINE# 'writeDisposition' : write_disposition , #NEWLINE# 'sourceTables' : source_project_dataset_tables_fixup , #NEWLINE# 'destinationTable' : { #NEWLINE# #INDENT# 'projectId' : destination_project , #NEWLINE# 'datasetId' : destination_dataset , #NEWLINE# 'tableId' : destination_table , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# return self . run_with_configuration ( configuration )