jimmybow commented on issue #5690:
URL: https://github.com/apache/hop/issues/5690#issuecomment-3263806079
> please add a little more detail: what are you trying to do, what works,
what doesn't? Also, doesn't sound like a P1.
below is the test code:
```
public boolean init() {
logBasic("init()");
return parent.initImpl();
}
public boolean processRow() throws HopException {
if (first) {
first = false;
/* TODO: Your code here. (Using info fields)
FieldHelper infoField = get(Fields.Info, "info_field_name");
RowSet infoStream = findInfoRowSet("info_stream_tag");
Object[] infoRow = null;
int infoRowCount = 0;
// Read all rows from info transform before calling getRow() method,
which returns first row from any
// input rowset. As rowMeta for info and input transforms varies
getRow() can lead to errors.
while((infoRow = getRowFrom(infoStream)) != null){
// do something with info data
infoRowCount++;
}
*/
}
Object[] r = getRow();
if (r == null) {
setOutputDone();
return false;
}
// It is always safest to call createOutputRow() to ensure that your
output row's Object[] is large
// enough to handle any new fields you are creating in this transform.
r = createOutputRow(r, data.outputRowMeta.size());
/* TODO: Your code here. (See Sample)
// Get the value from an input field
String foobar = get(Fields.In, "a_fieldname").getString(r);
foobar += "bar";
// Set a value in a new output field
get(Fields.Out, "output_fieldname").setValue(r, foobar);
*/
// Send the row on to the next transform.
putRow(data.outputRowMeta, r);
return true;
}
public void dispose() {
logBasic("dispose");
parent.disposeImpl();
}
```
--
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]