Skip to content

Commit

Permalink
Use unicodecsv to make it py3 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
bolkedebruin committed Mar 19, 2016
1 parent 239e338 commit 5603afa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions airflow/hooks/hive_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from __future__ import print_function
from builtins import zip
from past.builtins import basestring
import csv
import unicodecsv as csv
import logging
import re
import subprocess
Expand Down Expand Up @@ -477,7 +477,7 @@ def to_csv(
schema = cur.description
with open(csv_filepath, 'wb') as f:
writer = csv.writer(f, delimiter=delimiter,
lineterminator=lineterminator)
lineterminator=lineterminator, encoding='utf-8')
if output_header:
writer.writerow([c[0]
for c in cur.description])
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ def run(self):
'hive-thrift-py>=0.0.1',
'pyhive>=0.1.3',
'impyla>=0.13.3',
'unicodecsv>=0.14.1'
]
jdbc = ['jaydebeapi>=0.2.0']
mssql = ['pymssql>=2.1.1', 'unicodecsv>=0.13.0']
mssql = ['pymssql>=2.1.1', 'unicodecsv>=0.14.1']
mysql = ['mysqlclient>=1.3.6']
optional = ['librabbitmq>=1.6.1']
oracle = ['cx_Oracle>=5.1.2']
Expand Down

0 comments on commit 5603afa

Please sign in to comment.