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.  Union/Union All in LavaStorm

    Employee
    Posted 09-15-2015 08:47

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

    Originally posted by: sozdemir

    Hi all,

    I am looking for union or union all correlation. I don't see any option for these two in the correlation section.

    Capture.jpg

    What I want to accomplish is to be able to concatenate two files into one. For example, I may have two tables from different sources and they have nothing in common. I want to concatenate these two table into one:

    Employee:
    Emp_ID, Emp_Date

    Department:
    Dep_ID, Dep_Name

    Desired_Table:
    Emp_ID, Emp_Date, Dep_ID, Dep_Name

    Any help is much appreciated.

    Thank you.


  • 2.  RE: Union/Union All in LavaStorm

    Employee
    Posted 09-15-2015 09:01

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

    Originally posted by: stonysmith

    If you want a simple union as you're describing, you would want the CAT (concatenate) node with the UNION option.

    That would take this:

    Emp_ID, Emp_Date
    Joe,2015-09-15
    Susan,2015-09-15

    Dep_ID, Dep_Name
    1,Marketing
    2,Sales

    and produce this:
    Emp_ID, Emp_Date,Dep_ID,Dep_Name
    Joe,2015-09-15,null,null
    Susan,2015-09-15,null,null
    null,null,1,Marketing
    null,null,2,Sales

    which is very likely what you do NOT want.

    If you want to know what department Joe is in.. then you will need the Department ID for Joe in the first set of data.
    Then you could use either the lookup or the join nodes to produce this:

    Emp_ID, Emp_Date,Dep_ID,Dep_Name
    Joe,2015-09-15,1,Marketing
    Susan,2015-09-15,2,Sales


  • 3.  RE: Union/Union All in LavaStorm

    Employee
    Posted 09-15-2015 09:05

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

    Originally posted by: sozdemir

    Thank you for the reply.

    I was actually looking for the Cat option.

    Thank you again.