LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Join when there are no matching fields

    Employee
    Posted 09-29-2014 00:19

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: martin.norman@climber.se

    Hello,
    Is there a way to do an outer join when there are no matching fields in the tables?
    I want to get the cartesian product out of the join.
    For example
    Table A contains the field year with the values 2014 and 2015.
    Table B contains the field quarter with the values Q1, Q2, Q3 and Q4

    What I would like is to join the tables and get the following:
    Year,Quarter
    2014, Q1
    2014, Q2
    2014, Q3
    2014, Q4
    2015, Q1
    2015, Q2
    2015, Q3
    2015, Q4

    So far I have not found a way to do this.
    Is this possbile and how do you do it?

    br
    Martin


  • 2.  RE: Join when there are no matching fields

    Employee
    Posted 09-29-2014 06:05

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ejones

    You'll need to put something in the LeftInputKey and RightInputKey parameters. Put a constant value in them, the same value in both so that they match, like for example a 1 or a string expression like "x".


  • 3.  RE: Join when there are no matching fields

    Employee
    Posted 09-30-2014 08:04

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: andycooper

    Hi Martin,

    I've attached a graph with examples using the X-Ref and Inner Join nodes, both work in your scenario. If you're using a constant value then you don't really need to see orphan data using the X-Ref node but we would recommend using the X-Ref when working with new data sets as this can easily identify data quality issues. In a production environment the Inner Join node is more efficient where you know that there won't be any left/right orphans.

    Join Data with No Match.brg