Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
cjj
Contributor
Contributor

Read-only Processor schema and/or appending output schema

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:

  • A fixed input, with a pre-named field (e.g. myInputField) that will be used in the processor as a source on the input row
  • A fixed output, with a pre-named field (e.g. myProcessedFieldOutput) that will be output from the processor as a row

Ideally, this would be like the tAddLocationFromIP component, whereby you choose the field from the input that you want to use:

0693p00000AbhFZAAZ.png

and it appends a non-optional additional field

0693p00000AbhH1AAJ.png

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?

Labels (3)
1 Reply
ozhelezniak
Contributor
Contributor

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