Skip to content

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

@jrmidkiff

Description

@jrmidkiff

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions