3 Replies Latest reply: Jan 2, 2018 4:14 PM by omar bensalem RSS

    Associating two data tables

    Jeff Lee

      If the data tables are added by data load script, then how can I associate the two data tables?

        • Re: Associating two data tables
          Jeff Lee

          Is scripting then needed or there is a manual way to do it on Data Manager?

            • Re: Associating two data tables
              Steve Dark

              Hi Jeff,

               

              I would recommend using the Data Load Editor almost exclusively.  You can do everything in the load script, whereas some things can not be done in the data manager.

               

              To associate tables you simply need to rename columns so they match.  So to associate on the first column of these tables you would do:

               

              LOAD

                A,

                B

              FROM table1;

               

              LOAD

                C as A,

                D

              FROM table2;

               

              Job done.

               

              It's always a good idea to associate on only one field, so if you have a need to associate on more than one field first create a concatenated field with all the parts you need, e.g.

               

              LOAD
                 A & ':' & B as Key,

                 A,

                 B,

                 C

              FROM table1;

               

              LOAD

                D & ':' & E as Key,

                F

              FROM table2;

               

              You will find lots of information about associating tables in Qlik on the Community and elsewhere.  Note that the scripting is identical between QlikView and Qlik Sense - so some of the best information will be that which was written about QlikView.

               

              Hope that helps.

              Steve