kibear opened a new issue, #6002:
URL: https://github.com/apache/hop/issues/6002

   ### Apache Hop version?
   
   2.15
   
   ### Java version?
   
   21
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   Hi:
    I write a udjc,I just want to process input field, then put output 
filed(not include input filed, only new output field),but i cannot do that. 
Here is code:
   
   
   `String start;
   String end;
   String home;
   
   
   public boolean processRow() throws HopException {
   
        // Let's look up parameters only once for performance reason.
       //
       if (first) {
                start = getVariable("start");
                end = getVariable("end");
                home = getVariable("Internal.Entry.Current.Folder");
                first=false;
   
                System.out.println("start: " + start + ", end: " + end + ", 
home: " + home);
       }
        
        
        Object[] r = getRow();
   
        // If the row object is null, we are done processing.
       //
       if (r == null) {
                setOutputDone();
                return false;
       }
        
        System.out.println(r);
        
        // get input field
        //
        String dt = get(Fields.In, "dt").getString(r);
        String dev_code = get(Fields.In, "dev_code").getString(r);
        Double DsptPwr = get(Fields.In, 
"DsptPwr").getBigDecimal(r).doubleValue();
        Double NacVibY = get(Fields.In, 
"NacVibY").getBigDecimal(r).doubleValue();
        Double NacExtTemp = get(Fields.In, 
"NacExtTemp").getBigDecimal(r).doubleValue();
        Double AxCtrlCabTemp2 = get(Fields.In, 
"AxCtrlCabTemp2").getBigDecimal(r).doubleValue();
        Long WdSpd = get(Fields.In, "WdSpd").getLong(r);
   
        // set output field
        Object[] outputRow = new Object[data.outputRowMeta.size()];
        get(Fields.Out, "dt").setValue(outputRow, dt);
        get(Fields.Out, "full_code").setValue(outputRow, dev_code);
        get(Fields.Out, "DsptPwr").setValue(outputRow, DsptPwr);
        get(Fields.Out, "NacVibY").setValue(outputRow, NacVibY);
        get(Fields.Out, "DsptPwr").setValue(outputRow, NacExtTemp);
        get(Fields.Out, "AxCtrlCabTemp2").setValue(outputRow, AxCtrlCabTemp2);
        get(Fields.Out, "WdSpd").setValue(outputRow, WdSpd);
                
        putRow(data.outputRowMeta, outputRow);  
   
       return true;
   }
   `
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Actions


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to