-
Notifications
You must be signed in to change notification settings - Fork 0
Update to coadd table #12
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
Conversation
|
You should use |
JBorrow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need tests for these scenarios to check that the joins are all working, see https://github.com/simonsobs/mapcat/blob/main/tests/test_mapcat.py
| sa_relationship_kwargs={ | ||
| "primaryjoin": "AtomicMapCoaddTable.coadd_id == CoaddMapToCoaddTable.parent_coadd_id", | ||
| "secondaryjoin": "AtomicMapCoaddTable.coadd_id == CoaddMapToCoaddTable.child_coadd_id", | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't fully understand why these manual join relationships are necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get this error if I omit those lines:
AmbiguousForeignKeysError: Could not determine join condition between parent/child tables on relationship AtomicMapCoaddTable.child_coadds - there are multiple foreign key paths linking the tables via secondary table 'link_coadd_map_to_coadd'. Specify the 'foreign_keys' argument, providing a list of those columns which should be counted as containing a foreign key reference from the secondary table to each of the parent and child tables.
AtomicMapCoaddTableCoaddMapToCoaddTablelink table and related fields toAtomicMapCoaddTable