Hi, I have two tables, let’s call them Table A and Table B. There are three fields that make up the join between these two tables. Let’s call those Fields 1, 2 and 3 and for the purpose of my question, let’s say those fields have the same names in both tables.
To possibly make things even more complicated, Fields 1 & 2 are many-to-one joins, but Field 3 is one-to-one.
How do I build that join in LookML? I’ve only done joins that have one field to join on so I’m completely baffled.
Thanks in advance!
Scott
Joining tables on more than one field
If two of them are n:1 and one is 1:1, the overall impact of the join is that it will be a many to one relationship. I’ve not done this either, but I’d imagine a sql_on with AND to separate the conditions (base.fieldA = jointable.fieldA AND base.fieldB = jointable.fieldB AND base.fieldC = jointable.fieldC) would work. Have you tried this yet?
Cheers!
Ben
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.