Context usage in tDqReportRun

EnrichVersion
6.4
6.3
6.2
6.1
6.0
5.6
EnrichProdName
Talend Big Data Platform
Talend Data Fabric
Talend Data Services Platform
Talend Data Management Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
task
Design and Development > Designing Jobs
Data Quality and Preparation > Third-party systems > Data Quality components
Data Governance > Third-party systems > Data Quality components
Design and Development > Third-party systems > Data Quality components
EnrichPlatform
Talend Studio

Context definition

A context is characterized by parameters.
Term Definition
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.
If you generate a Job on a report in the Profiling perspective where the context usage is as below:
  • report editor: two context groups: ctxgroup1, var1 + ctxgroup2, var1
  • analysis editor: ctxgroup1, varA and varB + ctxgroup3, varA, varB
  • datamart connection: ctxgroupA, varC and varD
The context merge results in the Contexts view of the generated Job will be merged as in the capture below: