Skip to main content Skip to complementary content

Context usage in tDqReportRun

A context is characterized by parameters.
Term Definition
Context Gathers into a group the 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.
You can set the Job contexts:
  • In the Run view.
  • In the Browse Reports dialog box of the tDqReportRun component. The selected reports overwrite the Job contexts set in the Run and Context views.

When a Job is running, the context selected in the Run view is the only one to be taken into account. The context groups in the analysis editor and the Default context group in the Context view are ignored.

Updating a context

After updating a context used by the tDqReportRun component:
  • If it is a built-in context, regenerate the Jobs using this context.
  • If it is a repository context, open the Jobs using this context to accept the update.
This applies to main and referenced projects.

The contexts in the generated Jobs are in built-in mode.

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 data mart connection and analysis or report editors are merged together in a unified list in the Job Context view.

The Job Context 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
  • Data mart connection: ctxgroupA, varC and varD
The context merge results in the Context view of the generated Job will be merged as in the capture below:
Context view of a generated Job.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!