Skip to content

Dropping table upstream of a "source-switch" table leads to dropping of "source-switch" parent table #4

@dpeg22

Description

@dpeg22

Current behavior of datajoint is that dropping of a table upstream of a dependent part table requires dropping the parent table of that part table. For example: if DLCCentroid were to be dropped, PosSource would need to be dropped as well since PosSource.DLCPos is dependent on DLCPos and thus DLCCentroid. This becomes an issue since dropping PosSource also drops PosSource.TrodesPos and the downstream table IntervalPositionInfo, thus all position information, regardless of upstream source (DLC, Trodes, etc...) needs to be dropped and repopulated into IntervalPositionInfo. Given that some downstream analyses that depend on IntervalPositionInfo require lots of compute time, it would be beneficial to avoid dropping the table unnecessarily.

Loren has suggested copying whatever path is upstream of the source-switch table (PosSource, DLCModelSource etc..), which in this case would be the DLC processing path, modifying this path with the changes that would typically require dropping, and add another part table to the source-switch table to allow for this path to be a source. This would avoid dropping downstream tables, while also allowing changes.

This approach will require deprecating the ability to insert into old paths in order to force users to make use of the new behavior.
I would appreciate any feedback/thoughts on this potential fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions