Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
And I defined the valuesProvider inside the service.java file:
How to retrieve the column names of the Input Data inside getColumns method?
I have tried to add input data parameter as follow:
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!
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