bubbles icon indicating copy to clipboard operation
bubbles copied to clipboard

Error trying to convert from PostgreSQL to Sqlite

Open sfermigier opened this issue 11 years ago • 1 comments

I have data in a Postgres DB that I'd like to inject into Sqlite using a Pipeline.

source = open_store("sql", 'postgres://....')
#target = open_store("csv", "./data")
target = open_store("sql", 'sqlite:///data/data.sql')

stores = {
  'source': source,
  'target': target,
}
p = Pipeline(stores=stores)
p.source('source', 'xxx')
p.create('target', 'xxx')
p.run()

I get the following error:

sqlalchemy.exc.CompileError: (in table 'xxx', column 'yyy'): Compiler <sqlalchemy.dialects.sqlite.base.SQLiteTypeCompiler object at 0x102c10910> can't render element of type <class 'sqlalchemy.dialects.postgresql.base.DOUBLE_PRECISION'>

sfermigier avatar Jan 21 '14 15:01 sfermigier

Seems like a "concrete storage type" issue. Bubbles is trying to preserve the concrete storage type whenever possible. Some kind of data type hinting would be required (that's why this issue is marked also as "enhancement").

There is no clean solution for this problem at this moment.

Stiivi avatar Jan 31 '14 09:01 Stiivi