View Categories

Good use of contexts

3 min read

EAC lets you combine Talend contexts with centralized context files and task-level overrides. This gives you repeatable deployments while keeping sensitive or environment-specific values out of jobs.


When and how to use contexts efficiently

Use contexts to:

  • Parameterize your jobs (paths, hosts, credentials, feature flags).
  • Promote the same job from dev → test → prod without code changes.
  • Centralize values that must be consistent across many tasks.
  • Override a few values for a specific task only (without forking context files).

Key rule: Define multiple context groups (by project or environment), but only one effective context set applies per task run (computed by precedence below).


Sources & precedence (low → high)

When EAC prepares a run, each context key is resolved using this order:

  1. Talend job defaults
    The values embedded in the job for the Default context.
  2. Talend environment selected in Task setup
    The context = dev/test/prod… chosen for the task.
  3. Global context file (Context Files page)
    If a context file group is linked, keys from the file override Talend values. Only keys that exist in the Talend job are applied; extra keys are ignored.
  4. Task-level overrides (Task setup)
    Per-task key/value overrides take final precedence.

UI hint: Values that are actually used are highlighted with a green background in the Task setup preview.


Context files

Centralize values outside the job and reuse them across tasks.

  • Where: Context files
    Group files by Project.
    context by project
  • Format: Talend-style .properties (UTF-8)
    key value exemple
    • Spaces are allowed after =.
    • Unknown keys (not declared in the job) are ignored.
    • Prefer one file per environment.
  • Attach to tasks: In Task setup, select the Context file group to apply.
    context file in task set up

Applying contexts in Task setup

Open Tasks → {Task} → Task setup to configure:

  1. Talend environment (context) to run with: Default | dev | test | prod | …
  2. Context file group (optional): link a centralized file to override job values.
  3. Task overrides (optional): add/modify individual key/values for this task only.

You’ll see a preview of the effective context with green highlights on applied values.
context in task setup

Keep overrides minimal: add only what must differ for this task.


Execution details

Every run captures the context snapshot used to launch the job:

  • Open Tasks → {Task} → Last executions → {Execution}.
  • The header and logs remind the Talend env, any context file applied, and overrides.
    overwritted context log

This is essential for auditability and post-mortems.


Best practices

  • Define once, reuse widely
    Put shared values in context files (per project/environment). Use task overrides sparingly.
  • Name clearly
    projectA-dev.properties, projectA-prod.properties, etc.
  • Separate secrets
    Avoid plain-text secrets in files. Prefer vault-backed injection or environment-level secrets; if you must store them, restrict OS permissions.
  • Keep types stable
    Don’t switch a key from string to numeric between envs; Talend components may enforce types.
  • Version context files
    Store under VCS (private repo) and review changes like code.
  • DRY on overrides
    If many tasks share the same overrides, move them up into the context file.


Quick recipes

A) Promote dev → prod with a single job

  1. Upload projectA-prod.properties.
  2. In Task setup: set context = prod, link projectA (prod) file.
  3. Remove any task overrides. Save. Launch.

B) One task, slightly different endpoint

  1. Reuse the shared prod context file.
  2. Add one task override: api.base=https://api.alt.example.com.
  3. Save. Launch.

C) Audit a failed run

  1. Open the execution detail.
  2. Confirm Talend env, context file, and overrides used.
  3. Compare with expected values; adjust in Task setup or update the context file.