Skip to content

Commit

Permalink
Add bulk_dump abstract method to DbApiHook (#1471)
Browse files Browse the repository at this point in the history
  • Loading branch information
underyx authored and mistercrunch committed May 6, 2016
1 parent 415b363 commit aff5d8c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions airflow/hooks/dbapi_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,17 @@ def _serialize_cell(cell):
else:
return str(cell)

def bulk_dump(self, table, tmp_file):
"""
Dumps a database table into a tab-delimited file
:param table: The name of the source table
:type table: str
:param tmp_file: The path of the target file
:type tmp_file: str
"""
raise NotImplementedError()

def bulk_load(self, table, tmp_file):
"""
Loads a tab-delimited file into a database table
Expand Down

0 comments on commit aff5d8c

Please sign in to comment.