Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
MPogorelov1634291005
Contributor II
Contributor II

Select column names from input schema to java variable.

Hello everyone!

I use IntelliJ + Talend Component Kit.

How can I make some options in component where user can add column names from component`s schema.

I know that I must write some strings in configuration.java file. Help me please, if anybody can.

Labels (5)
5 Replies
undx
Creator
Creator

Hi @Makar Pogorelov​ ,

I think that you'll find what you need in the document https://talend.github.io/component-runtime/main/1.42.0/studio-schema.html#_accessing_columns_metadata

Best regards

MPogorelov1634291005
Contributor II
Contributor II
Author

Yes, it really helped me. Thank you!

Maybe can you ask on another one question?

 

I want use Table widget and I want fill him columns` labels from recieved input schema. I tried some steps, but no one works good. It should be like:

@Option

@Documentation("Table.")

List<Column> columnList=incomingSchema;

 

undx
Creator
Creator

Did you used a @structure annotation?

MPogorelov1634291005
Contributor II
Contributor II
Author

Yes, I have:

@Option

@Documentation("Incoming metadata.")

@Structure(type = Structure.Type.IN)

private List<Column> incomingSchema;

 

@Option

@Documentation("Table.")

List<Column> columnList=new ArrayList<>();

 

public static class Column implements Serializable {

@Option

@Documentation("Column name")

String label;

}

 

 

Now I want put column names from inputSchema to columnList. As result I want something like this:

0695b00000OB35MAAT.png

undx
Creator
Creator

The issue is that columns designed by schema editor will only be available at runtime, not at design!