Operations

Declare

This operation is a placeholder and is currently disabled. It may be available in future releases.

The Declare operation allows you to define custom variables or functions that can be used throughout your data processing pipeline. This operation is applied during the transformation phase and enables you to create reusable code components.

Overview

The Declare operation enables you to:

  • Define custom JavaScript functions that can be reused in other operations
  • Create variables with specific values or computations
  • Establish utility functions for complex transformations
  • Apply custom declarations to enhance your data processing capabilities

Configuration

This operation defines custom JavaScript functions or variables within the pipeline context. The specific implementation shown in the code example defines a function that prefixes user IDs with 'U'.

Examples

Basic Declaration

To declare a custom function that transforms user IDs:

  1. Add the Declare operation to your rule
  2. Define a function like:
function(str){
      return 'U' + str;
    }

Usage in Other Operations

Declared functions can be referenced in other operations within the same rule. For example, after declaring the userId function, you could use it in a transform operation to modify user ID values.

This operation provides a way to extend the functionality of your data processing pipeline with custom JavaScript code, making your transformations more powerful and flexible.

On this page