QSDA2024 practice question 10 of 10

A startup company is about have its Initial Public Offering (IPO) on the New York Stock Exchange. This startup company has used Qlik Sense for many…

Full set: 50 questions
A startup company is about have its Initial Public Offering (IPO) on the New York Stock Exchange. This startup company has used Qlik Sense for many years for data-based decision making for Sales and Marketing efforts, as well as for input into Financial Reporting. The startup's Qlik Sense applications use variables that have different values at different points in time. Due to the increased rigor required in record keeping for public companies, these variables must be clearly recorded in the script reload logs of the Qlik Sense applications. These logs are refreshed daily. The data architect wants to have the variables names, with their current values, written into the script reload logs. Which script statement should the data architect use?
Answer options
A: LogDetail
B: Trace Correct answer
C: Tag
D: REM
Correct Answer:
B. Trace
Explanation

The Trace statement is the correct command for this requirement. Its specific purpose is to write a user-defined string to the script execution progress window and, more importantly, into the script log file. This allows the data architect to output the names and evaluated values of variables during the script reload process. For example, using Trace 'Variable vSalesDate is $(vSalesDate)'; will record the variable's name and its current value in the log, satisfying the need for auditable records.

Why Incorrect

A. LogDetail: This is not a recognized or valid statement within the Qlik Sense script language.
C. Tag: This statement is used to apply metadata tags to fields loaded by a preceding LOAD or SELECT statement, not for writing arbitrary messages to the log.
D. REM: This is a comment statement. The script engine ignores any text following REM on the same line, so it is not executed or written to the log file.

References

1. Qlik Sense for Developers Documentation - Trace statement: "The trace statement is a debug statement that generates a string that is written to the script execution progress window and to the script log file."

Source: Qlik Sense® on Windows Help, "Script control statements: Trace".

2. Qlik Sense for Developers Documentation - Tag statement: "Tags fields loaded by the preceding LOAD or SELECT statement with the given tags."

Source: Qlik Sense® on Windows Help, "Script statements: Tag".

3. Qlik Sense for Developers Documentation - Script comments: "You can insert comments in the script, or deactivate parts of the script by using comment marks... REM is a statement that marks the rest of the line as a comment."

Source: Qlik Sense® on Windows Help, "Script syntax and chart functions: Script comments".

Scroll to Top