Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
IrwanAfandiGDP
Contributor
Contributor

How to retrieve record schema in ProcessorConfiguration File?

Hello guys,

I want to make custom components where the component can doing data quality checking. The problem is how do I get the record schema in ProcessorConfiguration.java? Because I want to make a dropdown component settings where the value of dropdown is the name of each field from my input data. For example like tFilterRow component, if you push add button, you can press the dropdown menu where the dropdown value come from data input fields. If in processor.java we can get the field name from "defaultInput.getSchema().getEntries().get(index).getName()", how about PreprocessorConfiguration.java because there isn't

@Input

final

Record defaultInput

Labels (4)
5 Replies
undx
Creator
Creator

Hi @IrwanAfandiGDP ,

Maybe this documentation will help you on your subject:

https://talend.github.io/component-runtime/main/1.33.0/studio-schema.html#_accessing_columns_metadata

 

Best regards.

 

--

Emmanuel

 

mchapman
Employee
Employee

Hi @Mohamad Irwan Afandi​, also consider that there are DQ Routines in the Code metadata folder that can be access from tMap and other components for field level DQ checks, and additional DQ capabilities (such as a full DQ Data Mart) in the Enterprise version of Talend.

gerjo
Contributor
Contributor

Does this solution works for someone? I tried the same. However, I only get ProcessorConfiguration filled at runtime and not at configuration time.

What will will be the way to get it at configuration time?

konvertilo
Partner - Contributor III
Partner - Contributor III

hi,

having the same issue there. It is impossible to get the schema at design time to "configure" the component. the documentation is not working "out of the box". 

 

If someone has a valid example of a classConfiguration.java having the schema displayed at design time, that would be very helpful.

 

Thank you.

wadde
Contributor
Contributor

We use config files almost everywhere, though these tend to be two-way files, saving settings on fly.

I know this will offend many people, but I use .INI files, as they are easy to edit. This has worked well as if a client has an issue we can download their config file and run the code locally with their exact settings.