-
Notifications
You must be signed in to change notification settings - Fork 19
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
add_missing_column_to_table fails as the quotation marks mismatch #469
Labels
🐛 bug
Something isn't working
Comments
@k-schmid I remember when writing that code that I was definetly not proud of this 'quick fix' solution - it had to break some day. |
FlorianK13
added a commit
that referenced
this issue
Oct 6, 2023
Instead of getting the column name from the error message, the missing columns are now received by comparing the existing database table with the new dataframe.
@FlorianK13 thanks a lot for the fast response. |
FlorianK13
added a commit
that referenced
this issue
Oct 6, 2023
Better have a for loop with a large number which will still stop at some point.
FlorianK13
added a commit
that referenced
this issue
Oct 6, 2023
Additionally rename function and change while True loop to for loop
FlorianK13
added a commit
that referenced
this issue
Oct 10, 2023
5 tasks
@FlorianK13 any updates on this? |
@chrwm Are we ready for the 0.14.0 release? |
chrwm
added a commit
that referenced
this issue
Nov 20, 2023
…g_column_to_table Alter way to catch missing columns error #469
@k-schmid We have just release v0.14.0 and it should be fixed now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the issue
When downloading (and extracting) the latest XML using the bulk download a stumble in to an error regarding new columns. The method add_missing_column_to_table tries to split the psycopg2 undefined column error message such that a column name is found. However the splitting argument "»" and "«" cannot be found.
See the full traceback:
Ideas of solution
I think the string splitting should be replaced by a more robust approach. E.g. check which columns are already in the table and which are assumed to be there prior to writing to the table. There are some approach listed here:
https://www.geeksforgeeks.org/get-column-names-from-postgresql-table-using-psycopg2/
Context and Environment
Workflow checklist
The text was updated successfully, but these errors were encountered: