Fix Version/s: None
Team:Data Release Production
The goal is to make it so that when we have a naturally one-to-one visit observation, we only define one visit dimension record, and associate with both the one-to-one visit system and the metadata-based visit system (since they agree).
This is mostly a dimensions configuration change, as far as daf_butler goes:
- remove visit_system from the implied dependencies of visit
- remove visit_system from the implied dependencies of visit_definition
- add a new dimension element, "visit_system_membership", with a required dependency on both visit and visit_system
But it also changes DefineVisitsTask pretty substantially; instead of blindly defining a new visit for the visit_system it was configured with, it should now be checking to see if an existing visit definition might be compatible with the one it would define, and if so, it's really just tagging the visit as belonging to its visit_system as well. There could be some tricky multi-row "update the database only if I would change it" logic that would need support upstream in daf_butler.
This ticket is an alternative to
DM-33703 and is incompatible with it.
That's what I was thinking, too. It would be good to have some kind of backwards-compatibility off-ramp, but maybe it's as simple as using astro_metadata_translator patches to add the new identifiers to raw metadata prior to some date.
I've got all of this working on
This ticket requires that we no longer use group_id for any visit definitions and solely use the first sequence number in the visit.