Six Stars

customComponent with any count of row inputs and schema output

Hello,

 

I want to create a custom component with the new talend component kit. The custom component can have more then one input. In the old version I can set min_input=1, how can I configure that with the new component kit? I see, I can add more:

 

@Input("myInput") final MyInput defaultInput

in the method header, but I want any number of inputs. I have try it with a list or an array. It does not work.

 

And how can I add a MultiSchema like we have in tFileInputMSDelimited:Unbenannt.PNG

 

I see @Option @Structure but that does not work...

 

Greets

 

Benjamin 

3 REPLIES
Employee

Re: customComponent with any count of row inputs and schema output

Hi Benjamin,

 

 

As you mentionned, you can define N inputs using @Input (it is mentionned here in the doc). However the framework will not support a dynamic number of inputs (or outputs)  nor a customizable join strategy directly for now. The solution to do it now is to define your join model in a single record, each column being an input and use an aggregation component before your processor to build the record as you intend. It will provide you the "guess schema" feature and let you have all the flexibility you need to configure the joining logic.

 

Romain

Romain
Talend Component Kit Documentation: https://talend.github.io/component-runtime/
Six Stars

Re: customComponent with any count of row inputs and schema output

With which component can I aggregation several rows into one row?

Employee

Re: customComponent with any count of row inputs and schema output

A t*Map ([1]) or tXMLMap should enable you to prepare your record for your processor.

 

[1] https://help.talend.com/reader/tM3os~7PoPzBK28jtBNgCw/usVFZrXILonTCNdL86safA

 

Romain

Romain
Talend Component Kit Documentation: https://talend.github.io/component-runtime/