5 Replies Latest reply: Jul 25, 2018 12:09 PM by Bala Bhaskar RSS

    Link Table

    Wanyun Yang

      I don't know if I get this right about LINK_TABLE:

       

      If we have many fact tables with columns: CUSTOMER and DATE, we can simply link them together with these two columns, which creates synthetic keys. The result will be the same as using LINK_TABLE. But since we want to avoid synthetics keys, we choose to use LINK_TABLE.

       

      Am I right on this? Is the any tutorial regarding LINK_TABLE?

       

      Thanks in advance!

        • Re: Link Table
          Justin Dallas

          Can we get a small demo that shows what you are trying to accomplish?

          • Re: Link Table
            Ali Ahmad

            Yes,

             

            You could say that is more or less what you are doing. The auto creates unique combinations just as a link table would.

             

            See more here:

             

            https://www.youtube.com/watch?v=nlGEQZSnmEQ&t=1s

            • Re: Link Table
              ishan Bhatt

              Hi Wanyun,

               

              Link Tables are used to link data that would otherwise not be able to be linked within QlikView/QlikSense. It is also

              one of the few tables in which you makes sense to have data at different granularity levels. Most probably developers use link table to avoid the synthetic key issue.

               

              Now Let see with the example.

              1.PNG

              2.PNG

              3.PNG

              4.PNG

              • Notice that we have a new table in our data model. It is the Link Table table. The Link Table contains the keyYearMonthCustNo that associates it with both the Sales table and the Budget table. It also contains the CustomerID field that associates it with the Customers table.
              • The Link Table also contains the Year and Month fields that use to be in the Sales and Budget tables. This allows you to still have access to all your data.
              • Now we can see customers whether or not they only have sales or only budget information because we are going through the LinkTable that contains information about both.
              • There is a little bit of overhead with a Link Table. It will increase the size of your document.
              • Also, it is very important to ensure you get all of your key fields correct and that you validate your data when using a LinkTable.
              • We also made use of another best practice which is using the autonumber function. The autonumber function returns a unique value for an expression. Using the autonumber function allows us to reduce the size of our document by storing our data in a number format. Numbers take up less space in the data model than a large string does.

               

              Hope this will helps you.

              • Re: Link Table
                Bala Bhaskar