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.


    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.


    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:


    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:



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


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


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


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



    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: