|Context||groups a number of parameters that are used to execute a Job in certain configurations. A context includes one context group at least, and one or more context variables.|
|Context group||contains the values of context variables, different context groups have different names.|
|Context variable||has a value and belongs to a context. Context variables may have different or identical names and values in different context groups.|
Rules used by tDqReportRun to merge context groups and context variables
When you generate a Job with tDqReportRun on a report in the Profiling perspective, all context groups used in the datamart connection and analysis or report editors are merged together in a unified list in the Job Contexts view.
The Job Contexts view will provide you with a complete matrix about all context groups and context variables used in the connection, analyses and report. This merge follows specific rules that cover cases where the variables used in different context groups have the same name.
The tDqReportRun component uses the following rules to merge context groups and variables:
If two context groups have the same name, there will be one context group with the same name after the merge. The new context group will contain all context variables from the two context groups. If two context groups have different names, there will be two context groups after the merge, each context group will contain all context variables from the two context groups.
- If the two context variables have the same name, only the first context variable is kept after the merge (the value of the second variable is discarded). A warning message will list the duplicate context variable names. If the two context variables have different names, the two context variables are kept after the merge with their original values.
- report editor: two context groups: ctxgroup1, var1 + ctxgroup2, var1
- analysis editor: ctxgroup1, varA and varB + ctxgroup3, varA, varB
- datamart connection: ctxgroupA, varC and varD