Skip to content

Updated view definition for AttributeData delete ETL - #975

Merged
jallentxbiomed merged 3 commits into
release26.3-SNAPSHOTfrom
26.3_fb_fixAttributeDataDeleteETLOnDuplicateDelete
Aug 10, 2026
Merged

Updated view definition for AttributeData delete ETL#975
jallentxbiomed merged 3 commits into
release26.3-SNAPSHOTfrom
26.3_fb_fixAttributeDataDeleteETLOnDuplicateDelete

Conversation

@jallentxbiomed

Copy link
Copy Markdown
Collaborator

No description provided.

@jallentxbiomed jallentxbiomed self-assigned this Aug 7, 2026
-- Jay Allen - Only propagate a delete if the kew no longer exists in the source. EventDataAndName
-- is not unique when CAMP holds duplicate attribute rows, so cleaning up duplicate
-- caused ETL to delete the legitimate value from exp.ObjectProperty
--

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment says "EventDataAndName is not unique..." but this query keys on PROC_ID, ATTRIB_KEY. Worth fixing so it doesn't mislead the next person reading this file.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EventDataAndName is equivalent to PROC_ID + ATTRIB_KEY. forgot to include that in parentheses. fixed

a.audit_date_tm
FROM audit.audit_coded_proc_attribs AS a
WHERE a.audit_action = 'D'
AND NOT EXISTS (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A correlated NOT EXISTS per audit row is fine as long as CODED_PROC_ATTRIBS(PROC_ID, ATTRIB_KEY) is indexed, otherwise this becomes a per-row scan during larger backfills.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I measured it against the actual db, and on a normal ETL run it does about 1500 quick index lookups rather than scanning the table, which is 4600 extra reads and 0.2 seconds. During a truncate and reset this takes 1.6 seconds in a job that runs for hours, so I don't think it makes that much of a difference. We can think about indexing the key value pair down the road, but for now I don't think it's necessary.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you say actual db was it your local dev data or a local copy of VGER animal db?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a fresh restore of the animal db this morning

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lintilla copy dump is the same exact animal db that was on VGER at 6 am this morning

@RameshRapa

Copy link
Copy Markdown
Collaborator

The teamcity build is still in progress just fyi

@jallentxbiomed
jallentxbiomed merged commit 62df085 into release26.3-SNAPSHOT Aug 10, 2026
6 of 7 checks passed
@jallentxbiomed
jallentxbiomed deleted the 26.3_fb_fixAttributeDataDeleteETLOnDuplicateDelete branch August 10, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants