-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Postgres cannot yet reliably handle null
typed columns
#10622
Comments
Hey the exception is due to something slightly different:
I'm not sure if ibis is designed to support inserting using dataclass instances (your approach above). Someone else can confirm Assuming it's not something that ibis supports, you'd need to build something yourself that sets the column types correctly on the temporary table as ibis won't use your type annotations |
Hi, thank you for the useful info. I am a newbie with Ibis and I am struggling to find out a way to properly define the type of each field/column before passing the record(s) to the PostgresBackend. Could you point me to the relevant part of the docs? (or provide an example for this case?) More in general, are these implementation details of Ibis documented somewhere? At the moment, I am pretty good at manipulating the content of a table, but when it comes to insert data from an external source or extract the records to dump them somewhere else outside the realm of Ibis I am pretty limited. Side note: the code above works fine when using a DuckDbBackend and a dataclass instance. |
Found it out: con.insert('address', ibis.memtable([record], schema=my_table_schema)) |
What happened?
I am trying to insert into this PostgreSQL table
the following instance of a Python dataclass
However, I get the following error:
I am not sure about its meaning, seems that Ibis does not support the insertion of NULL values even in columns of Postgres tables that allow NULL values... is it?
What version of ibis are you using?
9.5.0
What backend(s) are you using, if any?
PostgreSQL 13.5
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: