Handling Metadata in QlikView

    When it comes to providing metadata, QlikView allows users to provide table, column and field definitions by using COMMENT in the load script. This is beneficial for analysts, designers, and developers. In the below example, I will be going through a simple exercise.

    1.PNG

    After we load this, the data model looks like the below. When we hover over the table, we can see some basic information about this table, such as number of rows, fields, and keys. Although, this wouldn’t be enough for someone who doesn’t really deal with data modelling.

    2.png

    We can enhance this data model by adding metadata.  I also brought in another table called “Sales Person” so that I can elaborate on how to show metadata for more than one table:

    3.PNG

    First, we created a mapping table called “Table Map” which contains information about the tables in the data model. This could be an Excel file, or a table/view from a database. At the end of the second table, I used COMMENT to display information about these tables. After re-loading the script, we can see that above descriptions appear in the data model:

    4.png

    5.png

    We can repeat the same process to display metadata for each field in the data model:

    6.PNG

    When we hover over the fields in the data model, we can see the descriptions of each field:

    7.png

    We can even tag each field as measure or dimension which helps users greatly to determine which fields to use as dimensions or measures:

    8.PNG

    As a result of this, dimensions and measures appear on the top of the field list when creating a chart:

    8.5.png

    9.png

    Hope this helps everyone and I am attaching a blank qvw that has the above codes in the load script.

    Thank you.

     

    Other Published Documents on Qlik Community by Sinan:

     

    QlikView and Python Integration

     

    QlikView Automation Series – Unzip & Load Excel Files: