openego/data_processing

Error: Duplicate key (subst_id) in ego_grid_mv_griddistrict in ego_dp_mv_griddistrict.sql

Opened this issue · 0 comments

When executing ego_dp_mv_griddistrict.sql I get the following error:

sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ego_grid_mv_griddistrict_pkey"
DETAIL: Key (subst_id)=(155) already exists.

but looking at the code and the input / temporary tables I am not able to find where the duplication comes from (many of the temporary table also have a primary key, hence there could not be a duplicated key in them either).