Skip to content

jinjaTR

datacorner edited this page Dec 2, 2023 · 2 revisions

jinjaTR Transformer

Purpose

The purpose of this transformer is to manage data transformations on a specific column by using Jinja.

Configuration by using the SQL directly in the configuration file

The specific configuration (as a Datasource) in the configuration file section parameters inclues the following parameters:

  • template: The jinja template (formula or data transformation, see the Jinja documentation for more details)
  • column-name: Column name to apply the transformation
  • constants: constant data that can be used in the Jinja transformation.

Data sources configuration

  • Inputs : 1 input
  • Outputs : 1 output

Configuration example:

    "transformers":  [     
    { 
        "id": "T",
        "classname": "pipelite.transformers.jinjaTR",
        "inputs" : [ "S1" ],
        "outputs" : [ "S2" ],
        "parameters": {
            "template": "{{ col1 }}{{ C2 }}{{ col2 }}",
            "column-name": "col1",
            "constants" : { "C1" : 1, 
                            "C2": "|"}
        }  
    }],
    ... ] ...

In the example above the Data source S1 is read and a string concatenation is done between the column [col1] a constant (value = 1) and the column [col2].

🏠 Home
🔑 Main concepts
💻 Installation
🔨 Configuration
🚀 Running

Supported Data Sources
📄 CSV File
📑 XES File
📃 Excel File
📤 ODBC
🏢 SAP
🎢 ABBYY Timeline

Supported Transformations
🔀 Pass Through
📶 Dataset Profiling
🔂 Concat 2 Data sources
🆖 SubString
🆒 Column Transformation
🔃 Join data sources
🔃 Lookup
🔤 Rename Column Name

Extending pipelite
✅ how to
✅ Adding new Data sources
✅ Adding new Transformers
✅ Adding new Pipelines

Clone this wiki locally