Hello,
I am authoring a workspace, that uploading data in PostgreSQL database.
And I have difficulties to implement one function.
There is a validation that checks if value is not empty or null. If object has missing unique S_ID, it is still gets uploaded in the “Data” table. But also, I add a record in the “Errors” table, that feature has missing S_ID.
When features get uploaded in the “Data” table they are automatically assigned another unique key “ID” this is just a sequential number in “Data” table.
The task for me is to add “ID” from “Data” table when I create a record with error in “Error” table. Because it will be the only unique attribute by which feature can be identified in case it is missing S_ID.
The difficulties for me is that I am logging errors earlier than ID attribute is assigned to the uploaded features. I thought to use VariableSetter and Variable Retriever that should help in this case. But I don't know how to extract “ID” attribute anyway. I am using FeatureWriter transformer for final data upload in the DB. And I tried to add FeatureReader after it, but it doesn't see new “Id” attribute that is generated by DB.
I hope I managed to explain. Will appreciate any thoughts. Thank you!