Uploaded image for project: 'Pentaho Data Integration - Kettle'
  1. Pentaho Data Integration - Kettle
  2. PDI-1377

setting variables in subtransformation does not work

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Severity: None
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.1, 3.2.0 GA
    • Component/s: Transformation
    • Labels:
      None
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      subtransformations do not share their parent job's variable space. You can set variables viw the gui and thus inject variables from parent job, but you cannot set variables in the parent job. I have a subtransformation filtering all errors from an iport and exporting them as a file. I also want to set an error message in the parent job to be displayed in the mail. This is not possible.

      Would setting the parent job property in the subtransformation solve the issue?

      In Mapping.java:


      public void prepareMappingExecution() throws KettleException {
      // Create the transformation from meta-data...
      //
      data.mappingTrans = new Trans(data.mappingTransMeta);

      // Pass down the safe mode flag to the mapping...
      //
      data.mappingTrans.setSafeModeEnabled(getTrans().isSafeModeEnabled());


      add the following line:

      data.mappingTrans.setParentJob(getTrans().getParentJob());

        Attachments

          Activity

            People

            • Assignee:
              gdavid Golda Thomas
              Reporter:
              stemey stefan meyer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: