<s> import logging <EOL> from airflow . contrib . hooks . bigquery_hook import BigQueryHook <EOL> from airflow . models import BaseOperator <EOL> from airflow . utils . decorators import apply_defaults <EOL> class BigQueryToBigQueryOperator ( BaseOperator ) : <EOL> """<STR_LIT>""" <EOL> template_fields = ( '<STR_LIT>' , '<STR_LIT>' , ) <EOL> template_ext = ( '<STR_LIT>' , ) <EOL> ui_color = '<STR_LIT>' <EOL> @ apply_defaults <EOL> def __init__ ( <EOL> self , <EOL> source_project_dataset_tables , <EOL> destination_project_dataset_table , <EOL> write_disposition = '<STR_LIT>' , <EOL> create_disposition = '<STR_LIT>' , <EOL> bigquery_conn_id = '<STR_LIT>' , <EOL> delegate_to = None , <EOL> * args , <EOL> ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> super ( BigQueryToBigQueryOperator , self ) . __init__ ( * args , ** kwargs ) <EOL> self . source_project_dataset_tables = source_project_dataset_tables <EOL> self . destination_project_dataset_table = destination_project_dataset_table <EOL> self . write_disposition = write_disposition <EOL> self . create_disposition = create_disposition <EOL> self . bigquery_conn_id = bigquery_conn_id <EOL> self . delegate_to = delegate_to <EOL> def execute ( self , context ) : <EOL> logging . info ( '<STR_LIT>' , self . source_project_dataset_tables , self . destination_project_dataset_table ) <EOL> hook = BigQueryHook ( bigquery_conn_id = self . bigquery_conn_id , delegate_to = self . delegate_to ) <EOL> conn = hook . get_conn ( ) <EOL> cursor = conn . cursor ( ) <EOL> cursor . run_copy ( <EOL> self . source_project_dataset_tables , <EOL> self . destination_project_dataset_table , <EOL> self . write_disposition , <EOL> self . create_disposition ) </s>
