Skip to content
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

AIS Geocoder to Postgres.upsert() could upsert wrong data #42

Open
jrmidkiff opened this issue Jun 4, 2024 · 0 comments
Open

AIS Geocoder to Postgres.upsert() could upsert wrong data #42

jrmidkiff opened this issue Jun 4, 2024 · 0 comments

Comments

@jrmidkiff
Copy link
Collaborator

If you use the AIS Geocoder and the input file contains the fields that you will ultimately update in another table and then try to upsert that file into postgres, you may upsert the wrong data even if you correctly use the column mappings. This may be because the existing fields are retained in the temporary table created in dbtools.postgres.

The best workaround was to remove the fields in AIS Geocoder, but perhaps something is wrong with the create temp table or perhaps it should fail if a mapping is made to an existing column when trying to create the temp table.

See https://github.com/CityOfPhiladelphia/real_estate_tax_delinquencies/blob/bd6d7f931e00277c2bf4cfb09f0ffc4966f30e1b/tax_delinquencies.py#L81

@jrmidkiff jrmidkiff changed the title AIS Geocoder to Postgres.upsert() upserts wrong data AIS Geocoder to Postgres.upsert() could upsert wrong data Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant