blaze / odo

Data Migration for the Blaze Project
http://odo.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
1k stars 138 forks source link

csv to redshift error #577

Open dfernan opened 7 years ago

dfernan commented 7 years ago

Hi, I am trying to upload a csv file into redshift using the following command: table = odo.odo('c:/test.csv','redshift://user:pass@host:5439/db::table') but I get a rather unexpected error:

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2862, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-19-9d2d48ed82b0>", line 1, in <module>
    table = odo.odo('c:/expo.csv','redshift://user:pass@host:5439/db::table')
  File "C:\ProgramData\Anaconda3\lib\site-packages\odo\odo.py", line 91, in odo
    return into(target, source, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\multipledispatch\dispatcher.py", line 164, in __call__
    return func(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\odo\into.py", line 43, in wrapped
    return f(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\odo\into.py", line 149, in into_string_string
    return into(a, resource(b, **kwargs), **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\multipledispatch\dispatcher.py", line 164, in __call__
    return func(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\odo\into.py", line 43, in wrapped
    return f(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\odo\into.py", line 143, in into_string
    return into(a, b, dshape=dshape, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\multipledispatch\dispatcher.py", line 164, in __call__
    return func(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\odo\into.py", line 43, in wrapped
    return f(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\odo\into.py", line 131, in into_object
    return append(target, source, dshape=dshape, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\multipledispatch\dispatcher.py", line 164, in __call__
    return func(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\odo\backends\sql.py", line 505, in append_anything_to_sql_Table
    return append(t, convert(Iterator, o, **kwargs), **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\odo\core.py", line 44, in __call__
    return _transform(self.graph, *args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\odo\core.py", line 60, in _transform
    x = f(x, excluded_edges=excluded_edges, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\odo\backends\csv.py", line 371, in CSV_to_chunks_of_dataframes
    data = [first] + rest
TypeError: can only concatenate list (not "TextFileReader") to list

I am not sure if this is a bug of odo, or a problem with my configuration. I am using python3.6 and I installed odo doing

pip install odo
odo.__version__
Out[20]: '0.5.1'
TBusen commented 6 years ago

+1, but for MS SQL Server. Same error, same process