The environment configuration and installation process of KNIME secondary development

table of Contents

1. Build the premise

2. Install Node Development Wizard

3. KNIME software toolkit download

3.1 Load the KNIME software toolkit in eclipse

4. Install the required dependencies

5.Test the Example Extension 


1. Build the premise

2. Install Node Development Wizard

Eclispe页面: Help -> Install New Software
add–>name:KNIME 3.6 Update Site
Location: http://update.knime.com/analytics-platform/3.6
--> OK


KNIME Node Development Tools --> KNIME Node Wizard 3.6.0.v201805030959,
and then follow the prompts until finally installed and restart Eclipse

New node project

Create a KNIME Extension Project

In the Create new KNIME Node-Extension dialog window enter the following values:

  • New Project Name: org.knime.examples.numberformatter

  • Node class name: NumberFormatter

  • Package name: org.knime.examples.numberformatter

  • Node vendor: <your_name>

  • Node type: Select Manipulator in the drop down menu.

Replace <your_name> with the name that you like to be the author of the created extension. Leave all other options as is and click Finish.

Make sure that the checkbox Include sample code in generated classes is checked. This will include the code of the aforementioned Number Formatter node in the generated files.

but the checkbox Create and download KNIME Target Platform is not checked.

Insert picture description here

Insert picture description here

3. KNIME software toolkit download

  The download address of the KNIME software toolkit is https://github.com/KNIME/knime-sdk-setup/ . It should be noted that the software toolkit of each KNIME version is different, and different versions are included in the branches of this repository (as shown in Figure 3). Therefore, the correct branch of this repository must be selected to specify that it is used for development The working version of KNIME. For example, to develop code compatible with version 3.7, check out the branch releases/2018-12 (because KNIM was released in December 2018). If you want to use the latest for development, download the master branch directly, but please remember that due to API changes or loss, extensions that use the latest build may not be used in the release installation.

You can see the version in help -->about eclipse

3.1 Load the KNIME software toolkit in eclipse

 Import the software toolkit to eclipse: click File—Import—Existing Projects into Workspace—Next—Browse in turn. Select the software toolkit downloaded above, and finally click next to complete the import. After the import is complete, the Project Explorer is shown in Figure 6.

Note that both of these must be imported

4. Install the required dependencies

  • Double-click the file KNIME-AP.target to be used for development
  • Wait for a while, it will take time to install the dependencies, and wait for it to end
  • The upper right corner of the main page-----set as active target platform
  • Then wait for Eclipse to resolve and activate

After restarting, right-click KNIME Analytics Platform.launch and select Run As—KNIME Analytics Platform. After opening, the interface is shown in Figure 9. In this way, the development environment of KNIME is installed and configured.

Figure 9 KNIME interface

5.Test the Example Extension 

At this point, all parts that are required for a new KNIME Extension are contained in your Eclipse workspace and are ready to run. To test your node, follow the instructions provided in the Launch KNIME Analytics Platform Section of the SDK Setup. After you started KNIME Analytics Platform from Eclipse, the Number Formatter node will be available at the root level of the node repository. Create a new workflow using the node (see Figure below), inspect the input and output tables, and play around with the node.

 

Guess you like

Origin blog.csdn.net/weixin_43135178/article/details/114989067