odo

Read csv into database SQLite3 ODO Python

▼魔方 西西 提交于 2020-01-07 04:49:39
问题 I am trying to read in a csv into a new table in a new databased using ODO, SQLite3 and Python. I am following these guides: https://media.readthedocs.org/pdf/odo/latest/odo.pdf http://odo.pydata.org/en/latest/perf.html?highlight=sqlite#csv-sqlite3-57m-31s I am trying the following: import sqlite3 import csv from odo import odo file_path = 'my_path/' # In this case 'my_path/' is a substitute for my real path db_name = 'data.sqlite' conn = sqlite3.connect(file_path + db_name) This creates a

CSV to Oracle via Odo and SQL Alchemy

落爺英雄遲暮 提交于 2019-12-14 01:24:49
问题 I have this code that sends CSVs to Oracle but it's slower than molasses in January. I'd like to use odo but the documentation is scarce for this exact type of situation (data from CSV to Oracle). I'm not married to Pandas, so if it's better to not use it than that's fine with me. import pandas as pd import pandas.io.sql as psql from sqlalchemy import create_engine import cx_Oracle as cx engine = create_engine('oracle+cx_oracle://schema:'+pwd+'@server:port/service_name' ,encoding='latin1')

python odo sql AssertionError: datashape must be Record type, got 0 * {…}

坚强是说给别人听的谎言 提交于 2019-11-30 15:22:51
I'm trying to import a CSV into MySQL using odo but am getting a datashape error. My understanding is that datashape takes the format: var * { column: type ... } where var means a variable number of rows. I'm getting the following error: AssertionError: datashape must be Record type, got 0 * { tod: ?string, interval: ?string, iops: float64, mb_per_sec: float64 } I'm not sure where that 0 number of rows is coming from. I've tried explicitly setting the datashape using dshape() , but continue to get the same error. Here's a stripped down version of the code that recreates the error: from odo

python odo sql AssertionError: datashape must be Record type, got 0 * {…}

时光怂恿深爱的人放手 提交于 2019-11-29 22:29:17
问题 I'm trying to import a CSV into MySQL using odo but am getting a datashape error. My understanding is that datashape takes the format: var * { column: type ... } where var means a variable number of rows. I'm getting the following error: AssertionError: datashape must be Record type, got 0 * { tod: ?string, interval: ?string, iops: float64, mb_per_sec: float64 } I'm not sure where that 0 number of rows is coming from. I've tried explicitly setting the datashape using dshape() , but continue