Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend Component kit, How to access connection,keystore etc etc components into another component.

Greetings,

I using Talend Component kit to develop a custom component, my test environment is TOS 7.1.1   and i have the following use case which i m not sure if its supported in TCK or not.there is a custom database component that has an option (checkbox) to use an existing connection, when i selected on this, one or more connection components configured in studio  workspace should be selectable as a drop list in my custom component. In .jet this was easily done by defining  something like this 

  • <PARAMETER NAME="dbConnection" FIELD="COMPONENT_LIST"
    REQUIRED="true" FILTER="tmysqlconnection" NUM_ROW="10"
    SHOW_IF="USE_CONNECTION == 'true'" />

is this possible with Talend Component kit, or is there any kind of workaround to achieve something like this? 

 

Thanks and

Best regards

Samba.

Labels (2)
1 Solution

Accepted Solutions
florentlb
Contributor III
Contributor III

Thanks, this is very valuable feedback, I will go through it and make the necessary updates as soon as I can.

 

Is this still blocking you or did you find you way around?

 

Florent

View solution in original post

8 Replies
Anonymous
Not applicable
Author

Hello Samba,

 

In Talend Component Kit you can reuse the connection metada defined in the metadata tree (on the left) but not other components as connection for now. We will likely enable in a future version to reuse the configuration of another component the same way we support the metadata tree today. For now we need to decide if we limit it to the "configuration types" or if we enable to use another component as a template and use a matching algorithm for the properties, this is still under discussion.

 

Anonymous
Not applicable
Author

Hi  Romain,

thanks for the response and important updates on the stand of things.   Please if i may ask is it possible to add  configuration steps on how to use some of the new features  in the documentation(as part of the tutorials), for example i m trying to implement a simple guessSchema as its like this 

@DiscoverSchema
public Schema guessSchema() {
    return factory.newSchemaBuilder(Schema.Type.RECORD)
            .withEntry(factory.newEntryBuilder().withName("id").withType(Schema.Type.LONG).build())
            .withEntry(factory.newEntryBuilder().withName("name").withType(Schema.Type.STRING).build())
            .build();
}

In the documentation and getting certain  configuration errors , in this particular(guessSchema) case there is an error about the first parameter being a dataset configured with  @configure. Once more thanks for the updates.

 

best regards

Samba

 

 

 

 

 

best regards

Samba.

florentlb
Contributor III
Contributor III

Hi Samba,

 

I'll check the documentation and add any relevant info asap. Can you show me more details about your error and share some other examples of what you'd like to see in the documentation?

 

Florent

Anonymous
Not applicable
Author

Hi Florent,

thanks for your reponse,  According to the info on how to create a  guesSchema, and using  studio 7.1.1 to test the components,   i did something like this

  @DiscoverSchema
    public Schema guessSchema() {
        return factory.newSchemaBuilder(Schema.Type.RECORD)
                .withEntry(factory.newEntryBuilder().withName("offset").withType(Schema.Type.LONG).build())
                .withEntry(factory.newEntryBuilder().withName("payload").withType(Schema.Type.STRING).build())
                .build();
    }

 and i got the following errror  

 public org.talend.sdk.component.api.record.Schema de.cimt.talend.components.service.UiActionService.guessSchema(org.talend.sdk.component.api.service.record.RecordBuilderFactory) should have its first parameter being a
 dataset (marked with @Config)

even if i configure a dateset and pass it as a parameter to the guessSchema function, i still get the same error. 

Not  just that , in the recent version of the framework, certain roles are enforced on the use of datasets and datastores, it will also be great if in  documentation  , a demonstration of these roles  is implemented in the part " how to create  your first component",  and in particular how to define datasets and datastores in all the component types(inputs,outputs, processing). Why am i saying this? if i create a project with the latest version of the frame work be it from intellij or the browser,   following  the tutorials on how to create your first component, and then run it, i will have errors about datasets and datastores. 

once more thanks to for your reponse and great kudos to you gurus at Talend, i love your product.

Best regards

Samba

 

 

 

 

 

 

 

 

florentlb
Contributor III
Contributor III

Thanks, this is very valuable feedback, I will go through it and make the necessary updates as soon as I can.

 

Is this still blocking you or did you find you way around?

 

Florent

Anonymous
Not applicable
Author

Hello the @Config is a typo, it should be @DataSet. You can't implement a guessSchema method without a dataset configuration as first parameter.

Anonymous
Not applicable
Author

Hi Florent, 

i just realized this when i installed version 1.1.2 of the intellij plugin,  which generates a project with component-api 1.1.1 and  component-maven-plugin  1.1.2, it drove me crazy, then i reverted back to 1.1.1 with the speed of light. Thanks and 

best regards

Samba

Anonymous
Not applicable
Author

Hello, Samba!

Here is a Jira ticket to track progress related to Connection Component support in Talend Studio.
https://jira.talendforge.org/browse/TUP-21090
Idea is to generate Connection Component automatically out of @Datastore Configuration class.

Best regards,
Ivan