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: 
Stanley2
Contributor
Contributor

How to fill Dropdownlist with the list of column names from the Input Data?

Hello,

I want to build a custom component in Talend Open Studio Big Data and add a Dropdownlist in its Basic Settings.

This custom component will do some preprocessing to a column, so the user needs to select the column that wants to be processed from the Dropdownlist.

I need the Dropdownlist to be populated by the Input Data column names.

The Input Data that I mean is the data that passed to my custom component, for example from tDBInput.

 

Here is the option inside the configuration.java file:

0695b00000EbrrhAAB.png 

And I defined the valuesProvider inside the service.java file:

0695b00000Ebrs6AAB.png 

How to retrieve the column names of the Input Data inside getColumns method?

I have tried to add input data parameter as follow:

0695b00000EbrsQAAR.png 

The code above resulting an error with the message that the method should have no parameter.

Any other way to populate the dropdownlist with Input Data's column names?

Thank you in advance!

Labels (3)
1 Reply
undx
Creator
Creator

Hi @Stanley Giovany​ ,

@Proposable do not take any argument. Consider using the @Suggestable annotation https://talend.github.io/component-runtime/main/1.33.0/ref-actions.html#_suggestions

But as seen above, you won't be able to access to record schema. For accessing to schema have a look here : https://talend.github.io/component-runtime/main/1.33.0/studio-schema.html#_accessing_columns_metadata

 

Best regards

 

--

Emmanuel