Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
konvertilo
Partner - Contributor III
Partner - Contributor III

Component Configuration at design time : how to get and display the input schema

hi All,

I'm posting here a new question around this topic because the other one is very old.

I'm trying to create a component and get the structure of the schema coming in in the "Component Tab", in design time, with Studio v8.

very basic layout with only one item :

Have you been able to implement this ? any idea what I'm missing ? thank you for your help.

package com.konvertilo.talend.components.processor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.konvertilo.talend.components.dataset.CustomDataset;
import lombok.Data;
import org.talend.sdk.component.api.configuration.Option;
import org.talend.sdk.component.api.configuration.ui.layout.GridLayout;
import org.talend.sdk.component.api.meta.Documentation;
import org.talend.sdk.component.api.configuration.ui.widget.Structure;
import org.talend.sdk.component.api.record.Record;

@Data
@GridLayout({ @GridLayout.Row({ "dataset" }),
@GridLayout.Row({ "incomingSchema" }) })
public class KRankProcessorConfiguration implements Serializable {

@Option
@Documentation("My dataset.")
private CustomDataset dataset;

@Option
@Documentation("My Schema.")
@Structure(type = Structure.Type.IN)
private List<SchemaInfo> incomingSchema = new ArrayList<>();

@Data
@GridLayout({ @GridLayout.Row({ "label", "key", "talendType", "nullable", "pattern" }) })
@Documentation("Schema definition.")
public static class SchemaInfo implements Serializable {

@Option
@Documentation("Column name.")
private String label;

@Option
@Documentation("Is it a Key column.")
private boolean key;

@Option
@Documentation("Talend type such as id_String.")
private String talendType;

@Option
@Documentation("Is it a Nullable column.")
private boolean nullable;

@Option
@Documentation("Pattern used for datetime processing.")
private String pattern = "yyyy-MM-dd HH:mm";
}
}
1 Solution

Accepted Solutions
konvertilo
Partner - Contributor III
Partner - Contributor III
Author

lack of feedback. i close this.

View solution in original post

2 Replies
konvertilo
Partner - Contributor III
Partner - Contributor III
Author

Am I the only one to question this ?

konvertilo
Partner - Contributor III
Partner - Contributor III
Author

lack of feedback. i close this.