Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to make a component that will modify just one specific field and return a new input.
I'm using the Talend Component Kit for this, and building the component in Java.
I'm struggling to create a component that has:
Ideally, this would be like the tAddLocationFromIP component, whereby you choose the field from the input that you want to use:
and it appends a non-optional additional field
Is it possible to do this? I can't see any examples or other sources on GitHub that seem to achieve this, but I'm hoping it's possible?
Hi @CHrisa Jackson
Frankly, I think I didn't understand your question. Could you explain a bit more want do you want to get?
I'll try to answer.
You can control how many rows your component will produce. You can build a record with recordFactory (it's a service so you can inject in into your input and output component classes).
For input:
@Producer
public Record next() throws Exception {
Record record = this.recordFactory.newRecordBuilder().withString("desiredField", "Your speicific Value").build();
return record;
}
https://talend.github.io/component-runtime/main/1.28.2/tutorial-create-an-input-component.html