Altair SmartWorks Analytics

 

Node Plugin Builder

In previous releases, users create code nodes from scratch, although some advanced users may be able to leverage the GraphQL API to automate the creation of code nodes. Unfortunately, this practice wastes time, and the node generated cannot be reused in the same or a different workflow.

The Node Plugin Builder, which is available in SmartWorks Analytics v2022.0, allows you to create a code node for a given engine plugin, with the corresponding metadata, sockets, and code, and then deploy this node to the platform environment, where it becomes available from the Palette to all users. The plugin can also be downloaded as a package. This new feature will allow users to attain greater levels of productivity, by saving time otherwise spent manually recreating code nodes, and collaboration, by creating and sharing resources that may be leveraged by coding and non-coding users alike. Thus, customers will be able to shorten their time to production.

The general steps to create a node plugin are as follows:

  1. Create a Node Plugin execution profile.

  2. Create a node plugin.

  3. Export or deploy the plugin.

Each of these steps is discussed below.

Creating the Node Plugin Execution Profile

Steps:

  1. Select the Execution Profile icon from the SmartWorks Analytics sidebar.

  2. The Execution Profiles page displays.

  3. Click Add New Execution Profile.

  4. The Execution Profile Properties page displays.

  5. Specify the following details for the Execution Profile that you want to create:

  6. Property

    Description

    Engine

    Select Application Node Builder Adapter from the Engine dropdown.

    Execution Profile Name 

    Specify a name for the Execution Profile.

    Description

    Enter a description for the Execution Profile.

    Session limit

    Use the + or – buttons to select a maximum number of sessions that can be supported by the Execution Profile.

    Select Unlimited (default) if you do not wish to implement a session limit.

    Session limits are only applicable when Single Sign-On (SSO) is not implemented. Imposing session limits can help reduce the chances that concurrent usage of shared execution resources will be pushed beyond their limits.

    You cannot limit the number of sessions of an Execution Profile to a value less than the number of sessions currently in use.

     

  7. Click Save to save the changes to the Execution Profile.

  8. Optionally click Cancel to discard the changes that you have made.

 

Creating the Node Plugin

Steps:

  1. Select the Node Plugin Builder icon from the SmartWorks Analytics sidebar.

    The Node Plugin Builder page displays.

  2.  

  3. Provide the following details in the Configure tab of the page.

  4. Property

    Description

    Display Name

    The name of the node plugin. This name displays in the Palette when the plugin is deployed.

    Description (optional) 

    The description of the node plugin.

    Label

    The "programming name" (DNS label) of the plugin. The label should start with a letter and end with a letter or digit; it can otherwise contain letters, digits, and hyphens, is not case sensitive, and should be short but descriptive.

    Version Tag

    The version of the plugin to be built, ideally formatted as Major.Minor.Build (e.g., 1.0.1).

    Engine

    The application engine to use (i.e., Pandas or Pyspark).

    Icon

    The icon representing the plugin. You can use the default icon or select a different icon from the library. Icons must be saved to the .svg format.

     

  5. In the Code tab of the page, provide input/output properties for the code.

  6. Property

    Description

    Input/Output Socket Name

    The name of the socket.

    Input/Output Socket Type 

    The socket type, i.e., Static or Dynamic. Static sockets are fixed for every node, whereas Dynamic sockets allow you to add as many as necessary to the node.

    Input/Output Coding Name

    The coding name

    Input/Output Data Type

    The data type underlying the object node plugin in the chosen engine, e.g., pandas.core.frame.DataFrame or pyspark.sql.DataFrame

    Output Object Name

    The name of the output object (only applicable to output sockets)

     

    You can create as many input/output sockets as you wish by clicking the + Add Input link. You can also delete an input/output property by clicking the Remove icon located to the right of each property.

     

  7. In the Code Editor, enter the code you'd like the node to execute.

  8. The code for each node available in the Palette can be viewed in the Code tab of a node. You can simply copy and edit this code so that unsupported operations in the UI (e.g., modifications in delimeters, import parameters, simultaneous ML operations, etc.) can be performed by the node when run. You can also provide a custom code.  

    The example below shows sample code to create a simple table with two columns named Name and Age.

     

Exporting and Deploying the Node Plugin

When the properties and code of the node plugin have been specified, click the Deploy tab. If the necessary details are complete, the Export to Library and Deploy buttons will be active.

 

You can:

  • Export the node plugin to the library with the .tgz extension by clicking the Export to Library button. Once in the library, the artifacts can be downloaded from the library to the local desktop and shared with users on other SmartWorks Analytics environments, where a designated administrator can deploy them using the API.

 

  • Deploy the plugin by clicking the Deploy button. When a node plugin is deployed, it displays in the Code groups of the Nodes tab of the Palette.

 

A  new group, i.e., Custom Code, is also created in the Palette; this group will contain the deployed plugin.

 

Using the Node Plugin

Once the node plugin has been deployed, you can add it to your workspace.

Steps:

  1. Create a new workspace or open an existing one.

  2. In the Palette, click the Execution Profiles tab and start a session for the node plugin execution profile you created earlier.

  3. Drag and drop the Node Plugin from the Code group of the Nodes tab in the Palette.

  4. Add the necessary inputs, connect it to the code node, and then run it as usual.