Custom Node developement

Hi,
I want to develop a custom node based on the Statistics node which is under ‘KNIME Statistics Nodes’. Can someone please let me know the procedure and/or any document that can be followed to work on developing a custom node in KNIME.

Thank you

Regards,
Vipul

Hi @vipul,
there are a lot of resources to get you started. Please have a look at the following links which describe how to set up the SDK and how to develop an extension.

Kind regards
Alexander

4 Likes

Hi there @vipul,

you missing something from Statistics node?

Br,
Ivan

Hi @AlexanderFillbrunn, @ipazin,

No. It’s just I want to display some alternative statistics other than Min/Max for a specific use-case. I know this can be done by creating Metanodes by using the client. However, I wanted to understand the custom node development process.

So, in order to customize the Statistics node do I have to use the ‘KNIME Node Wizard’ to get the code for Statistics node in the knime-stats repo: https://github.com/knime/knime-stats/tree/5049336bf3acd0b4b8974dc48e0ed83b1ac259a1

I want to know, how I should configure the KNIME Node Wizard in order to work with Statistics node.

Regards,
Vipul

Hi @vipul,
as far as I know there is no built-in way of choosing a node and customizing the code directly. You have to set up your SDK and then check out the statistics plugin via git. When it is in your Eclipse workspace and you start KNIME from the SDK, your code should be loaded instead of the native Statistics node.
Kind regards
Alexander

1 Like

Hi @AlexanderFillbrunn,
Thank you so much.

So does it mean that I have to clone the knime-stats repo into my local and then work on it?

Regards,
Vipul

So does it mean that I have to clone the knime-stats repo into my local and then work on it?

Yes, exactly. Just be aware that this will replace the default Statistics node that KNIME comes with. If you want both yours and KNIME’s, you should create a new plugin and simply copy the code of the Statistics node into it and give it a different name.
Kind regards
Alexander

1 Like

Hi @AlexanderFillbrunn @ipazin,

I cloned the knime-stats repo and now I’m trying to launch the KNIME Analytics Platform to run it but I’m getting this error when I’m trying to build it:

Non-resolvable parent POM for org.knime:knime-stats:3.8.0-SNAPSHOT: Could not transfer artifact org.knime.maven:parent-pom:pom:1.0.0-SNAPSHOT from/to knime.base.p2 (${knime.base.p2}): Cannot access ${knime.base.p2} with type p2 using the available connector factories: AetherRepositoryConnectorFactory, BasicRepositoryConnectorFactory and ‘parent.relativePath’ points at wrong local POM @ line 8, column 10 ->

Can you please help me resolve it.
The whole idea is to manipulate and work with Statistics node in KNIME and test it. I was able to work with the NumerFormatter example and test it too.

Regards,
Vipul

Hi,
that is a strange error, as it comes from Maven, but the stats package is an OSGi-plugin. You should not need any pom here at all, as far as I know. Can you share a screenshot of the project in your Eclipse workspace? Did you configure the project as plugin-project?
Kind regards
Alexander

Hi @AlexanderFillbrunn

Please find the steps that I followed to clone the repo and errors:
Step1


Error: After Maven build

Regards,
Vipul

Hi,
Can you exclude knime-stats and only keep the projects starting with “org.knime.”. knime-stats itself is just the containing folder, not an Eclipse project.
Kind regards
Alexander

Hi @AlexanderFillbrunn @ipazin

Now I cloned it by only using the ‘org.knime’ packages. However, I’m still facing below errors.

Error in tsne package and org.knime.update.stats packages’ pom.xml

Error when the KNIME Analytics Platform launches:

Could you please let me know where I’m going wrong or provide me with guidelines to work with Stats package and how I should configure Eclipse for the same. I have followed all the things mentioned in Quickstart Guide and KNIME SDK Setup.

Regards,
Vipul

Hi,
org.knime.update.stats is only the update site and you don’t need it for local development. Simply close the project in Eclipse. If you only need the Statistics node, you can also close the org.knime.ext.tsne project and everything should work. Otherwise I’d need the errors Eclipse shows for the tsne project (Window -> Show View -> Problems).
Kind regards
Alexander

Hi @AlexanderFillbrunn ,

Thanks a lot Alexander. Sure, I’ll try that.

Below are the errors:

Regards,
Vipul

Hi,
in your project folder for org.knime.ext.tsne there is a folder named “lib” that contains 4 Jar files. From the errors shown above at least 3 of them seem to be corrupted. Could you take for example core-0.26.jar, copy it somewhere and rename the copy to core-0.26.zip and try to extract the contents? Does that work?
Kind regards
Alexander