Once you've connected the required scripting node to the data flow, you'll need to add the script; you can download a script via the Pyramid Marketplace, select a shared script, or write a script. You then need to configure the script by selecting a virtual scripting environment, defining input and output columns, and more.
Configure the Scripting Node
Connect the Scripting Node
To add a script to the data flow, connect the relevant scripting node to the table containing the columns you want to input into the script. Configure the script from the node's Properties panel.
There are four kinds of scripting node:
- Scripting Model: machine learning models that have been built using a learn and predict script, then saved, can then be used as a target via the Scripting Model node.
- Market: download a Python or R script from the Marketplace catalog.
- Python: download a Python script, inject a shared Python script, or write a Python script.
- R: download an R script, inject a shared R script, or write an R script.
For Python and R nodes, you can select a regular script, or a learn and predict script (red highlight below). Learn and predict scripts are trained on a given data set, and can then be used to make predictions.
- Click here to learn about learn and predict scripts.
Adding a Script
There are three ways that scripts can be added: you can download a script from the Marketplace, inject a shared script that was built in Formulate, or write or paste a script directly into the script window.
Download a Script
Click the shopping cart icon (green arrow above) to open the Pyramid Marketplace; this is a catalog of scripts that can be downloaded.
- Click here to learn more about the Marketplace.
Inject a Shared Script
Scripts can be constructed in the Formulate module and shared to the content manager; these scripts can then be injected into scripting nodes in the Data Flow. Click the folder icon (blue arrow above) to inject a shared Python script into the node.
- Click here to learn about injecting a shared script.
Write a Script
Add your own script by writing it or pasting it directly into the script window (purple highlight above).
Scripting Environment and Packages
Pyramid allows admins to create multiple virtual scripting environments; this enables Admins to run multiple versions or Python and/ or R, and multiple package versions. Choose the scripting environment that runs the required language and package versions (orange highlight above).
- Click here to learn more about choosing a scripting environment.
Any script that is downloaded, injected from a shared script, or written or pasted is written in the Script window (orange highlight above).
Inputs and Outputs
The input window is used to configure the column(s) that will be injected into the script (green highlight below). Add all the columns in the table as inputs by clicking 'Add all' (purple highlight below).
The output window is used to configure the new column(s) that will be produced by the script (blue highlight below). You can also determine whether the new column(s) will be added to the existing table (the table to which the scripting node is connected), or stored in a new a table (orange highlight below).
When you download a script from the Marketplace, Pyramid automatically detects the inputs and outputs. When writing a script of choosing a shared script, you'll need to configure the input and output columns yourself. You also have the option to use to let Pyramid auto detect the output from the script (yellow arrow below).
- Click here to learn more about scripting inputs and outputs.
- Click here to learn more about the auto detect function.