Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am doing some work for a Chemical company, and they have quite a lot of chemical elements as part of the workflows. (currently in KNIME) There is a Java CDK (Chemical Development Kit) here at https://cdk.github.io/
The question is, how do I incorporate this in Open Studio and make the components available?
Kind Regards
Rafe
Hello Rafe,
We have reported your issue to our component experts and then come back to you as there is more information available.
Best regards
Sabrina
Hello,
Could you please share a bit more information?
What is the workflow you use?
How do you expect to use this CDK as part of the workflow?
We are supposing that maybe a simple routine in talend would be enough for your requirement.
Lets ASSUME you have something like a:
row2.chemicalName
but you'd need to know the elements for it.
row3.chemicalElements = cdkRoutine.getElementsForChemical( row2.chemicalName );
Once you know the patterns you can decide what would be the better.
Pretty much anything can be achieved via routines + tJavaFlex.
TCK makes it a lot simpler to do a nice UI, have automated tests, etc.
Feel free to post your issue here.
Best regards
Sabrina
Hi Sabrina,
The guys and girls that will be using this long term are not IT based, so I was hoping to have a component PER routine, as they are not coders (They are Chemists) looking to analyse chemicals and find similar properties in chemicals. They understand chemical elements, bonds, descriptors, structures etc. Probably worth pointing out I am a Data / Solutions Architect helping them build a data platform, so not a coder or Chemist either!
To do this, they will use a variety of the components in the CDK in a pipeline to clean, mix and analyse chemicals and make new chemicals.
Now, if the pipeline is the same component, just with different Java code in it, it will be very hard to understand what the pipeline is doing as you would need to click into each component and decode the java. It would be much clearer if they can see a getElementsForChemical component that feeds into a component to add descriptors, that then calculates then sends it to the toSvgStr component to render it.
In effect, it's just like doing ETL with chemicals - but imagine if all your pipeline tools were the same component, and you had to open each and every component up to see if it was a tMap or a tSplitRow....Hence, why a component per function would be best fit - but how to go about it is the question!
I hope that makes it a bit clearer what we are looking for?
Kind Regards
Rafe
Hi @Not defined Not defined,
Creating a routine, making use of the CDK Jar files, would be the easiest way to implement the code in this library. But I see what you are saying about the chemists not necessarily being able to write Java or understand it. We do have our own CDK (component development kit) which you can use to create components which will do as you describe. Details on this can be found here....
https://community.talend.com/s/blog/aGn3p000000Gp5y/talend-component-toolkit
It should be pointed out that you will need Java to create components, but once you have them, then you can do as you require.
Regards
Richard
Hi Richard,
Thansk for your advise. I have used the tool and followed the example, however, as soon as Idrag my component onto the canvas, I get the following error:
I presume having declared "private static" is not something that the kit determines and not something I should over-ride. The error log gives a little more details, but not much!
rg.talend.sdk.component.studio.websocket.WebSocketClient$ClientException: MESSAGE
status: 500
Content-Type: application/octet-stream
Date: Tue, 29 Nov 2022 10:46:32 GMT
{"code":"UNEXPECTED","description":"Unable to make field private static volatile java.net.Authenticator java.net.Authenticator.theAuthenticator accessible: module java.base does not \"opens java.net\" to unnamed module @3e138703"}^@
at org.talend.sdk.component.studio.websocket.WebSocketClient$PayloadHandler.payload(WebSocketClient.java:427)
at org.talend.sdk.component.studio.websocket.WebSocketClient$PayloadHandler.payload(WebSocketClient.java:401)
at org.talend.sdk.component.studio.websocket.WebSocketClient$PayloadHandler.access$2(WebSocketClient.java:400)
Given I followed the tutorial, I would not expect volatility in an example. I have checked the versions and I am running the 1.5.1 of the plugin. The compatibility tool states i should use the latest that has passed QA - but that is not something published that I can see in the Open Source version - you just get a link to download the latest version of TODI.
Any thoughts or help would be welcome (even if they cost) - including any pointers to using the tool or videos (I have searched YouTube but come up blank!)
Kind Regards
Rafe
Hi @Not defined Not defined ,
What's your environment? (studio version, component-runtime version, jdk version, etc.)
According the screenshot you're using a jdk version >= 11 (certainly >=17)!
To fix opens you need to modify your `Talend-Studio-XXXXXX.ini` and include the following jvm arguments at the end:
```
--add-modules=ALL-SYSTEM
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
--add-opens=java.base/java.util.regex=ALL-UNNAMED
--add-opens=java.base/java.util.stream=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/sun.nio.cs=ALL-UNNAMED
--add-opens=java.base/sun.security.action=ALL-UNNAMED
--add-opens=java.base/sun.security.x509=ALL-UNNAMED
--add-opens=java.base/sun.util.calendar=ALL-UNNAMED
--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED
```
Restart your studio and try again.
Best regards.
The best way is to create a small Java Maven project and add this dependency to this project. Now you will get all the dependend jars also.
Next step is to put all the classes and files from all jars into one! You can also use Maven to do so. Use the shade plugin.
Next you add this new big jar to your Talend studio and load it with tLibraryLoad.
You can use the classes according to the project documentation in a tJavaRow or tJavaFlex or tJava component.