Hey everyone! I’m using tap-facebook (singer-io), ...
# troubleshooting
a
Hey everyone! I’m using tap-facebook (singer-io), with everything selected. Getting this error which is causing everything to fail on a table I need (adinsights) -
Copy code
meltano     | elt    | Loading failed (1): target_postgres.exceptions.PostgresError: ('Exception writing records', NotNullViolation('null value in column "created_time" violates not-null constraint\nDETAIL: Failing row contains (6126793189055, Frozen, null, null, 6123283643455, 1635845505, 0).\nCONTEXT: COPY tmp_8361cbe1_fdcf_4e4e_ae59_33462741f8dd, line 1: "6126793189055,Frozen,NULL,NULL,6123283643455,1635845505,0"\n'))
Is there anyway to disable the constraint, or otherwise work around this issue?
drop on the table should do it as well? Assuming the tap advertises it properly and the target respects the constraint, all depends 🤷
a
@alastair_stuart - If the failure were in the target python code, I'd say you can override
key_properties
to an empty list and thereby remove/suppress the primary key constraints. However, that error message looks like it is specific to the SQL insertion operation, due to a constraint already present on the target table. In that case, @visch's avice is probably best: either a manual
ALTER TABLE
command on that target table - or just drop/recreate the table if that's easier.