1 Reply Latest reply: Apr 29, 2016 3:03 AM by Marcus Sommer RSS

    Load within Load, changing a key based off of another table.

    Ryan Carrier

      Hey guys, I want to change a field (key) on load to another value (key), based off of the table that key is referencing.
      I have made a simplified example below;

      FROM:

       

      Key

      AKey
      01
      12
      23
      34
      44

       

      USING:

      AKeyGroupName
      1AFirst
      2ASecond
      3BFirst
      4BThird

      TO:

      KeyAKey
      04
      12
      23
      34
      44

       

      So in this case if the Group is "A" and Name is "First" the Akey should be the same as the Akey of when the Group is "B" and Akey is "Third"

       

      The keys seem to be changing somewhere along the line, which is why I can't just hard swap them on the load.

       

      I have added stub of my example below;

       

       

      1

      Data:

        2

      Load * inline

        3

      [

        4

      Key,AKey

        5 0,1
        6

      1,2

        7

      2,3

        8

      3,4

        9

      4,4

      10

      ];

      11

      LinkTable:  

      12 Load * inline
      13

      [

      14

      AKey,Group,Name

      15

      1,A,First

      16

      2,A,Second

      17

      3,B,First

      18

      4,C,Third

      19

      ];


       

      I wanted to do a load within a load, but that doesn't seem to work in qlik like it does in SQL, The data is about 4GB over a 20Meg link for the whole office, with about 40 Million lines, so I don't really want to do a select within select in sql, would be wasteful.

       

       

      Any help is appreciated, thanks.