Monday, January 17, 2011

Meta Tags in QlikVIew 10

One of the more talked about features missing in prior versions of QlikView is the ability to store Meta Data within a QlikView application.  Short of the 'Help Text' in prior versions there were not a lot of options (you could include a data source with descriptive information on table structures/fields) prior to version 10 but this was more of a work around).


In QlikView v10 there are more choices for setting up Meta Data tags in the QlikView interface and the script. I will walk through a few different examples of the available features below:


Expression Comments:
When using the chart wizard there is a new Expression Comment box within the Expressions tab.  Here you can enter comments or select meta data from a data source to tag some basic commentary about a particular expression.


Comment Field Highlighted in Yellow
Consider the image to the right.  Here my expression is expressed in a variable that could have easily introduced into my application from a data source (a repository of expressions).  I am describing the what my variable '$(vGoals)' means using plain text.  I can also read this from the same data source as the expression itself allowing for meta data regarding expressions to be maintained outside of my QlikView application and leveraged across many applications.


Document Properties/Tables:
When you view the Document Properties (Tables Tab) in QlikVIew 10 there is a new option ('Edit Tags') when you highlight a field with the field list. 
Edit Tags within Document Properties/Tables Tab
Looking at the image to the left, I selected the field 'G' and selected the Edit Tag button in the footer.  A new Edit Tags dialog box appeared where I selected 'Add' to add additional Meta Data to this field.


There is no limit to the number of tags that can be added here.  You will also noticed that there some existing Meta Data provided by QlikView on the type of field. In this case we can see that the field 'G' is numeric and is of the type integer.


Table Viewer - Mouse Over Field
Once I add my own set of tags you can see these tags show in the table viewer when you mouse over the field name.  In my example to the right you can see 'Goals Scored By Player' and 'Puck Goes In The Net' as an example of descriptive tags entered in the interface above.


Adding Tags in the Script:
Meta Tags can be added via the script using a Mapping Load and the Tag Function.  Using the same example above I have an external source that has the field names and some meta data descriptions.  Using the script sample below I can load the Meta Data using a Mapping Load in conjunction with the Tag command:
Use of Mapping Load and the TAG Function

The Tag function provides a way of assigning tags to a field. Field names not present in the document are ignored. If conflicting occurrences of a field or tag name are found, the last value is used.
A field tagged with dimension will be displayed at the top of all field selection controls in QlikView except in the Edit Expression dialog.
A field tagged with measure will be displayed at the top of all field selection controls in the Edit Expression dialog.  Examples of where these tags display are below:



 
Table Viewer
Select Fields Dialog
Chart Wizard
These new features are welcome additions to QlikView in helping you better track Meta Data in your QlikView applications.  Your users will appreciate the added value of having Meta Data descriptors when trying to enhance their QlikView applications.

/emb

5 comments:

  1. Using the syntax MAPPING... / TAG FIELDS USING...
    Did you manage to add multiple tags to a single field?
    In such case, how is organize your document nlhtags.xlsx?
    For multiple tags, the field A appears several time in your xls document, or you use a separator in the column tag?

    ReplyDelete
  2. Can this example be downloaded from anywhere?

    ReplyDelete
  3. Great information on Meta Tags in QlikVIew-10 for the beginners, Here you have provided a good ray of light for the students. thanks a lot. QlikView Training in Hyderabad

    ReplyDelete
  4. Wow,this blog actually provides information about meta tags and makes people aware that it is used in Qlik View alongwith HTML.

    Qlik Soap API Connection

    ReplyDelete