hunk.code_window:         cur.execute("""
               LOAD DATA LOCAL INFILE '{tmp_file}'
               INTO TABLE {table}
               """.format(**locals()))
           conn.commit()
  
hunk.labels: keep keep keep keep add
hunk.after_edit:     @staticmethod
       def _serialize_cell(cell, conn):
           """
           Returns the MySQL literal of the cell as a string.
           :param cell: The cell to insert into the table
           :type cell: object
           :param conn: The database connection
           :type conn: connection object
           :return: The serialized cell
           :rtype: str
           """
           return conn.literal(cell)
hunk.file_path: airflow/hooks/mysql_hook.py
hunk.type: add
file: # -*- coding: utf-8 -*-
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  # http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  """
  Example of the LatestOnlyOperator
  """
  import datetime as dt
  
  from airflow.models import DAG
  from airflow.operators.dummy_operator import DummyOperator
  from airflow.operators.latest_only_operator import LatestOnlyOperator
  from airflow.utils.trigger_rule import TriggerRule
  
  
  dag = DAG(
      dag_id='latest_only',
      schedule_interval=dt.timedelta(hours=4),
      start_date=dt.datetime(2016, 9, 20),
  )
  
  latest_only = LatestOnlyOperator(task_id='latest_only', dag=dag)
  
  task1 = DummyOperator(task_id='task1', dag=dag)
  task1.set_upstream(latest_only)
  