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

What is the recommended approach to build a Custom Component?

Hey Community,

 

I need to develop a custom component and I am supposed to use the new Component Framework. However I can't find an appropriate starting point for this topic.

 

The main ressources I found were:
1. https://github.com/Talend/components/wiki
and

2. https://help.talend.com/reader/C0dGRfXr_xwP1vm8wG62BA/SGxjYVOKBZwp~ENBEWS50g

 

I feel like 1 is missing a lot and just doesn't provide me everything I need to know to get started. 2 is kind of easy to follow, but just doesn't work for me in the end, since the component won't show up in my studio (TDF 7.0.1) despite a successfull Build Process.

 

So my final question is:

What is the recommended way to build a custom component using the new component framework?

 

Stretch Goal Question:

Would you recommend to use the new component framework at all, or is it safe to just use the way better documented old framework?

Labels (3)
13 Replies
Anonymous
Not applicable
Author

Hello @njozefzoon,

 

Record support was added in the coming release of the studio and not in 7.0 which uses 1.0 version of the framework.

Replace RecordBuilderFactory by JsonBuilderfactory and Record by JsonObject for older versions.

 

Romain

 

Anonymous
Not applicable
Author

Awesome!! That totally works!! Thank youSmiley Happy

Anonymous
Not applicable
Author

What I wanted : Create a deadly simple component which just connect to MongoDb (Because I "only" have Talend MDM Platform License and not talend Big Data which has a MongoDb connector)

What was Ok :
Component was built via MVN : mvnw clean install
Component was correctly deployed to TOS : mvnw talend-component:deploy-in-studio -Dtalend.component.studioHome="C:\Talend-Studio\studio"

What was breaking, and really, REALLY time-consuming to deal with  :
Errors with Recod no class def found.
Errors with component-server, il breaks when starting the Studio.
Errors with access denied on localhost:8080 (localhost component-server address).
Component was not displayed in Studio Designer Palette

What did not change anything:
Reinstall TOS completely
Change JDK Version
Open TOS in admin mode
Declare global maven repository in config.ini
Declare custom java.port in config.ini

WHAT WORKED !!! :
Replace Record in component code : 

import org.talend.sdk.component.api.record.Record;

by

import javax.json.JsonObject;

Replace any usage of Record with JsonObject in code...
Rebuild the component, redeploy it, restart TOS...

What it produces :
TOS is loading without component-server error...
TOS is loading without no class def found (Record) Error...
Component appears in Palette !!

OK !!
Thank you @rmannibucau !

Since I lost hours to understand (and find your tip btw..) please, do something to add this tip in the documentation for TOS 7.0.x... to save us life time and hours of crying in front of our computer 0683p000009MACn.png End users like us are (maybe ?) not supposed to know that 7.0 version is not supporting this kind of small issue with framework version support etc...


json1.PNG
json2.PNG
OK.PNG
Anonymous
Not applicable
Author

Moreover, you have to check very carefully the compatibility matrix, and modify your pom.xml accordingly :

https://talend.github.io/component-runtime/main/1.1.12/compatibility.html