Code
Last updated
Last updated
Ylem is a no-code solution but as with every modern no-code solution, you still can write code if you want to:-)
From time to time you need to resort to complex data transformations. Say a single filter is not enough, so you can write custom Python 3.9 code with a full range of features over your data work.
This is what a "Code" task is for. It has an input as JSON, with which you can do whatever you want.
Let's say that we have the following dataset and see what we do with it.
The simplest example can be achieved by using the "Filter" block. But what if we need more complex filtering?
Let's filter out rows of a type "invoice" that have an "amount" less than 2000:
The result of the workflow above
Let's calculate the total amount:
Yes, the "Code" supports Pandas framework. This is how you can work with it and the input dataset:
Our Python processor is based on RestrictedPython, therefore the "Code" task supports many standard Python libraries but not all of them. Let us know if you want to use something that is missing and we'll be happy to add it.
json
re
time
datetime
pandas