Creating a process
Last updated
Last updated
You can add a Python script as a process to the Information Factory. It is important that this script uses the ellipsis Python package to read data from and write data to the Information Factory.
Data always needs to be read and written using the ellipsis Python package to make use of server side reading optimization. This optimization will kick in whenever the process runs on the server side, instead of on clients side.
You can find an example of such a script here.
Once a file with the script of interest has been created you can submit it to a git. Make sure you include a requirements.txt within the git. This file should contain all dependencies and the file needs to be placed in the root of the git. You can find an example requirements.txt here.
With this done you can add the process to the information factory. Click the button new in the top of the left menu bar and pick more -> New Process.
In the pop up provide the git url and the path to the script within that git.
Whenever the server is requested to run the process it will automatically use the most recent code in your git. That is to say you do not need to re-add your process when you update it.
Your script can take free parameters that can be provided whenever the process is ran.
You need to declare these parameters when you add the process.
You will be asked to provide a name for the parameter, a description and an example.
Make sure your process works well under the given example parameters. This makes it easier for others to reproduce your process.
When the process is ran by a user he or she is asked to provide the parameters.
These parameters will be passed to your script as command line parameters and can be read in the following way.
Mind that all parameters will be passed as strings and need to be parsed to an appropriate format.