Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm currently using the latest version of the Talend Component Kit, and I'm trying to reuse connections created with tDBConnection, but I don't now how to access the connections. Any input would be appreciated, as my code currently creates multiple connections to the same database inside the same components.
Best regards
Kaan
Hi @Kaan Yildirim ,
if you mean how to develop a connection component for your connector, you can see the part :
"How to create a reusable connection in Studio" in
https://talend.github.io/component-runtime/main/1.34.0/creating-dataset-datastore.html
Hey @Wei Wang ,
I would like to create a connection to any Database (using tDBConnection) and to use the connection for a generic Component which would then do some magic. My goal is to have a field in the component settings in talend with a dropdown menu where I then can pick the connection (similar to tDBInput etc.).
I will try to follow the Guide, thanks 😊
Up. I have the same question
OK, I got it working. like described here: https://talend.github.io/component-runtime/main/1.47.0/creating-dataset-datastore.html
I do now have an extra connection component and on the input component there is a checkbox "use an existing connection" and I can select the Connection component.
But if I check "use an existing connection" the connection parameters stay in my input compoent.
I have defined the connection parameters in an DataStore.
So I think they should disappear in Input component, when "use an existing connection" is checked.
I thought about using @ActiveIf annotation in my DataSet definition. But what should be the condition for the @ActiveIf?
Any Ideas?
OK, I found the bug in my code.
I had a variable with the same name as a class. This caused this not working like described in the links above.
After fixing this, all works fine.