Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dpeg22 opened this issue Sep 26, 2022 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@dpeg22
Copy link
Collaborator

dpeg22 commented Sep 26, 2022

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.

@dpeg22 dpeg22 added bug Something isn't working help wanted Extra attention is needed labels Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant