Skip to content

Commit

Permalink
Merge pull request apache#40 from timifasubaa/cherrypick_hive_csv_fix
Browse files Browse the repository at this point in the history
call next() the right way
  • Loading branch information
michellethomas authored Apr 11, 2018
2 parents f295eb7 + b195ed0 commit 1515587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/db_engine_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ def create_table_from_csv(form, table):
"""Uploads a csv file and creates a superset datasource in Hive."""
def get_column_names(filepath):
with open(filepath, 'rb') as f:
return unicodecsv.reader(f, encoding='utf-8-sig').next()
return next(unicodecsv.reader(f, encoding='utf-8-sig'))

table_name = form.name.data
filename = form.csv_file.data.filename
Expand Down

0 comments on commit 1515587

Please sign in to comment.