Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
FSchober1607791906
Contributor
Contributor

Column Selector in component configuration.

Hello,

I'm trying to create a custom component, where the component reads some data from an input column. The column where the data is selected from is supposed to be selected from a dropdown menu.

I managed to create such a dropdown menu using @Proposable and @DynamicValue, but I have no way of accessing the schmema of the MAIN input connector.

Is there any way of doing this?

current code:

 

// in datastore

@Documentation("")

@Option

@Proposable("path_column")

String file_path;

 

// in service

@Documentation("")

@DynamicValues("path_column")

public Values getFilePathColumn() {

// i somehow need to return the column-names from the input schema here

}

 

Labels (4)
6 Replies
FSchober1607791906
Contributor
Contributor
Author

I just found out about the @BuiltInSuggestable(BuiltInSuggestable.Name.INCOMING_SCHEMA_ENTRY_NAMES) annotation.

Unfortunately this is not available in TS 7.1.1.

I guess there is no other way then?

Anonymous
Not applicable

Hi @Ferdinand Schober​ ,

I am not a component developer, but have you already referenced the tFilterRow or tSortRow components. They have a field that allows user to select the columns from the schema of the MAIN input connector.

Regards

Shong

FSchober1607791906
Contributor
Contributor
Author

where would I find the source code for those?

Anonymous
Not applicable

You can find the source code of component in folder:

<Studio installation directory>\plugins\org.talend.designer.components.localprovider_7.3.1.20200213_1003\components

FSchober1607791906
Contributor
Contributor
Author

Doesn't seem like the internal components are anythink like ones you write with the component sdk. So unfortunately this doesn't really help.

Anonymous
Not applicable

Hi

I'm sorry I didn't help you, I will forward your question to our component developers, I hope they can provide some suggestions or ideas.

 

Regards

Shong