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: 
Safus
Creator
Creator

Pre defined FINAL schema with Talend Component Kit (TCK)

Hi,

Is it possible to define a pre-defined and FINAL schema of a component using TCK ?

Want the component to come with its own schema, visible to user when clicking the (...) and getting into schema definition's view. (Which is now of course empty.)

I tried almost everything but when opening the component the schema does not show up.

For the moment I'am using the init() method to define my schema but it is not the point . It's not visible to the user since it's calculated at runtime.

Thank you !

6 Replies
Anonymous
Not applicable

Hello,

We have reported your issue to our Component Kit experts and then come back to you as soon as possible.

Best regards

Sabrina

undx
Creator
Creator

Hello @safouane BEN MANSOUR​ ,

Apparently, the feature you need is the guess schema feature. In Studio, you'll have a button named _Guess schema_ which will feed automatically your defined schema.

You'll find some hints for implementing in the documentation : https://talend.github.io/component-runtime/main/latest/studio-schema.html#_discovering_schema_guess_schema

Beware, on `DiscoverSchema` annotation, it should be called like your dataset name.

Best regards.

Emmanuel

Safus
Creator
Creator
Author

Hello Undix,

 

Yes I know about the @DiscoverSchema, and I already used it multiple times before asking this question.

This still requires an action from the user. ("Clicking the guess schema button of the component).

Just wanted to know if without doing anything, the component comes with predefined schema at render time.

Something like calling an annotated method with "@DiscoverSchema" automatically.

Hope this time it is better explained.

 

Best reagrds,

Safus

 

Anonymous
Not applicable

Hello @safouane BEN MANSOUR​ ,

 

I'm afraid that would be a new feature request which would touch multiple teams on our side. We'd need a way to say: This component has a static schema. And once this is there then studio/cloud apps could auto-fetch the schema.

 

Unfortunately from our current connectors perspective, this would be only applicable for the t*List components (which usually list the file(s) available and their details) which we don't have a lot, so this isn't something we plan to do short-term.

What is your use-case?

Or is it more to help end-users who forget to press the Guess Schema button?

 

Regards,

Balázs

Safus
Creator
Creator
Author

Hello @Balazs Gunics​ ,

 

I do not have a particular use case but I though to my self that it would be a good feature to have, if we want to assist end-users and do some pre-work before executing the component logic.

 

It would be better too to have a FINAL fixed predefined schema that the component can auto fetch without letting the end-users to modify it.

 

I understand now that such a feature does not exist, may be one day we will be able to use it in further version of the framework.

 

Thank you for your time.

 

Regards,

Safus

Anonymous
Not applicable

As I'm sure eventually this will make sense for components who don't alter their schema. But only if/when we have lots them.

To not forget this idea, I'd suggest to raise this feature/enchament either directly in JIRA: https://jira.talendforge.org/projects/TCOMP/

Or even better raise it as a support ticket and that way we'll have the customer account associated as well.

 

With that being said maybe this is something for the coming years. (2024 or beyond)

 

If you think about it even some of our static schemas change in javajet: Calculate MD5 hash for tFileProperties for example.

 

Or maybe studio could auto-call the Guess Schema when: Parameters changed and user is clicking away from the component: "The schema of this component differs from the configured, o you want to refresh it? [Yes] [Yes and propagate changes] [No]" (not sure about the feasibility but this would actually make sense to all component and could solve your issue of users have to click / when they forget click the job doesn't work)