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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use Record in schema as a List parameter with component kit

How to use Record in schema as a List parameter with component kit, like in tfilterRow component

0683p000009M2cK.pngHow to use Record in schema as a List parameter with component kit

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi @Bilel.Charradi 

component-api release 1.1.2  introduced BuiltInSuggestable API. 

Component configuration option (parameter) annotated with BuiltInSuggestable will be displayed in Studio as drop down list with proposed values. Currently, the only supported value for proposed list is INCOMING_SCHEMA_ENTRY_NAMES, which means proposed values consist of incoming schema columns names. Incoming schema here is a schema of previous linked component.

 

However, component-api 1.1.2 was released after Studio 7.1.1 release. So, BuiltInSuggestable API is not integrated and can't be used in Studio yet.

It is planned to integrate it in next Studio version.

 

Anyway, here are some examples:

1. Single select option.

 @Option
 @Documentation("doc")
 @BuiltInSuggestable(value= BuiltInSuggestable.Name.INCOMING_SCHEMA_ENTRY_NAMES)
 private String schemaColumn;

 

Note, for table case you'll need to declare class, which represents table. E.g.

public class TableRow {

    @Option
    @Documentation("doc")
    @BuiltInSuggestable(value=BuiltInSuggestable.Name.INCOMING_SCHEMA_ENTRY_NAMES)
    private String inputColumn;

    @Option
    @Documentation("doc")
    private FunctionEnum function;

    @Option
    @Documentation("doc")
    private OperatorEnum operator;

    @Option
    @Documentation("doc")
    private String value;
}

and then use this Table class as option in Component configuration class:

public class Configuration {

  @Option
  @Documentation("doc")
  private List<TableRow> table;

}

 

2. Multi select option

 @Option
 @Documentation("doc")
 @BuiltInSuggestable(value= BuiltInSuggestable.Name.INCOMING_SCHEMA_ENTRY_NAMES)
 private List<String> severalColumns;


After new version of Studio will be released, you'll be able to add BuiltInSuggestable annotation in your code.

Best Regards,

Ivan Gonchar

 

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi @Bilel.Charradi 

component-api release 1.1.2  introduced BuiltInSuggestable API. 

Component configuration option (parameter) annotated with BuiltInSuggestable will be displayed in Studio as drop down list with proposed values. Currently, the only supported value for proposed list is INCOMING_SCHEMA_ENTRY_NAMES, which means proposed values consist of incoming schema columns names. Incoming schema here is a schema of previous linked component.

 

However, component-api 1.1.2 was released after Studio 7.1.1 release. So, BuiltInSuggestable API is not integrated and can't be used in Studio yet.

It is planned to integrate it in next Studio version.

 

Anyway, here are some examples:

1. Single select option.

 @Option
 @Documentation("doc")
 @BuiltInSuggestable(value= BuiltInSuggestable.Name.INCOMING_SCHEMA_ENTRY_NAMES)
 private String schemaColumn;

 

Note, for table case you'll need to declare class, which represents table. E.g.

public class TableRow {

    @Option
    @Documentation("doc")
    @BuiltInSuggestable(value=BuiltInSuggestable.Name.INCOMING_SCHEMA_ENTRY_NAMES)
    private String inputColumn;

    @Option
    @Documentation("doc")
    private FunctionEnum function;

    @Option
    @Documentation("doc")
    private OperatorEnum operator;

    @Option
    @Documentation("doc")
    private String value;
}

and then use this Table class as option in Component configuration class:

public class Configuration {

  @Option
  @Documentation("doc")
  private List<TableRow> table;

}

 

2. Multi select option

 @Option
 @Documentation("doc")
 @BuiltInSuggestable(value= BuiltInSuggestable.Name.INCOMING_SCHEMA_ENTRY_NAMES)
 private List<String> severalColumns;


After new version of Studio will be released, you'll be able to add BuiltInSuggestable annotation in your code.

Best Regards,

Ivan Gonchar

 

Anonymous
Not applicable
Author

Thank you @igonchar

 

I tested your solution in talend studio 7.2.1 M1 with component kit 1.1.2 version.

but the the example of "Single select option"  did't work (==> the annotation below has no effect)

@BuiltInSuggestable(value= BuiltInSuggestable.Name.INCOMING_SCHEMA_ENTRY_NAMES)

;  

Anonymous
Not applicable
Author

Hi @Bilel.Charradi 

 

Unfortunately, Talend Studio 7.2.1 M1 doesn't have support of BuiltInSuggestable API too.

This feature was integrated later than 7.2.1 M1 build.
However, next milestone build will have it.

 

Best regards,

Ivan Gonchar

Anonymous
Not applicable
Author

UPDATE: Solved. To be able to use classes in this scenario, they have to be Static

 

I have a problem here:

When I use a Object i get the following Error: org.apache.xbean.recipe.MissingFactoryMethodException: Constructor has 1 arugments but expected 0 arguments: public org.deidentifier.arx.talend.processor.RiskThresholdsConfiguration$QIValue(org.deidentifier.arx.talend.processor.RiskThresholdsConfiguration,java.lang.String)
The Constructor is a empty one.

 

The second problem, in the Simple Case, i can select the fields but the List is Null in the Configuration, what make i false?