Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix how we track object status in analytics (#16322)
## Description This PR fixes how we are tagging object status in object and transaction object table. Currently, all output object statuses are incorrect i.e. created objects are marked as deleted, deleted as mutated and mutated as created. This would require some careful fixing. These are the proposed steps to fix: 1. Stop the ingestion pipelines for object and transaction_object tables (ensure currently running pipelines are done processing) and run the following commands: 2. `UPDATE dataset.OBJECT SET object_status = 'Mutated_tmp' WHERE object_status = 'Created';` 3. `UPDATE dataset.OBJECT SET object_status = 'Created' WHERE object_status = 'Deleted';` 4. `UPDATE dataset.OBJECT SET object_status = 'Deleted' WHERE object_status = 'Mutated';` 5. `UPDATE dataset.OBJECT SET object_status = 'Mutated' WHERE object_status = 'Mutated_tmp';` 6. `UPDATE dataset.TRANSACTION_OBJECT SET object_status = 'Mutated_tmp' WHERE object_status = 'Created';` 7. `UPDATE dataset.TRANSACTION_OBJECT SET object_status = 'Created' WHERE object_status = 'Deleted';` 8. `UPDATE dataset.TRANSACTION_OBJECT SET object_status = 'Deleted' WHERE object_status = 'Mutated';` 9. `UPDATE dataset.TRANSACTION_OBJECT SET object_status = 'Mutated' WHERE object_status = 'Mutated_tmp';` 10. Deploy pipelines with the new binary (which includes this fix)
- Loading branch information