I'm trying to write a pandas dataframe that contains a JSON column into a postgres database using odo. Here is what I have:
from odo import odo odo(df, 'postgres://localhost:1234/testdb::test_table')
test_table has a JSON column called data. odo is unable to copy the dataframe and gives me
*** NotImplementedError: No SQL-datashape match for type JSON.
I then tried to explicitly specify the JSON type for the column:
odo(df, 'postgres://localhost:1234/testdb::test_table',
dshape='var * {data: json}')
*** TypeError: DataShape json is not NumPy-compatible
As you can see, it then gives me an error that DataShape json is not Numpy-compatible. How do I go about doing this with odo? Pandas to_sql works without a hitch, btw. The only problem is it's really slow.
I'm trying to write a pandas dataframe that contains a JSON column into a postgres database using odo. Here is what I have:
from odo import odo odo(df, 'postgres://localhost:1234/testdb::test_table')
test_table has a JSON column called data. odo is unable to copy the dataframe and gives me
*** NotImplementedError: No SQL-datashape match for type JSON.
I then tried to explicitly specify the JSON type for the column:
As you can see, it then gives me an error that DataShape json is not Numpy-compatible. How do I go about doing this with odo? Pandas to_sql works without a hitch, btw. The only problem is it's really slow.