Generating a LEFT JOIN via configured relationship #275
oliviabarnett
started this conversation in
General
Replies: 1 comment 8 replies
-
|
Can you share a rough schema for these tables, including any primary key or unique constraints? (PS: I think if you left out the |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I have two tables --
accountsandkyc_infos, each of which contains anaccount_idandapp_idfield. Theaccount_idandapp_idfields are a unique combination for both tables.I wanted to do a LEFT JOIN when selecting from the
accountstable, pulling in the relatedkyc_inforow (if present). I followed the preload instructions here, but ended up creating a relationships configuration in my bobgen.yaml that was backwards:I had to change it to:
That allowed this to work:
I think it would be super helpful if the configuration file was also included in the example -- its not clear what the relationship between jets and pilots is to me and led to my setting this up incorrectly.
It's also not really clear to me why I have to set up both directions in the first place -- I would kind of think just one defined relationship would work both ways?
Beta Was this translation helpful? Give feedback.
All reactions