FileTransform ​File​Transform

yaml
type: "io.kestra.plugin.graalvm.python.filetransform"
yaml
id: transformPython
namespace: company.team

tasks:
  - id: download
    type: io.kestra.plugin.core.http.Download
    uri: https://dummyjson.com/carts/1
  - id: jsonToIon
    type: io.kestra.plugin.serdes.json.JsonToIon
    from: "{{outputs.download.uri}}"
  - id: transformPython
    type: io.kestra.plugin.graalvm.python.FileTransform
    from: "{{ outputs.jsonToIon.uri }}"
    script: |
      if row['id'] == 666:
        # remove un-needed row
        row = None
      else:
        # remove the 'products' column
        row['products'] = None
        # add a 'totalItems' column
        row['totalItems'] = row['totalProducts'] * row['totalQuantity']
Properties
Format uri