Skip to main content
Data pipeline functionality supports data transformation during loading to efficiently convert and clean source data for your chosen table schema. You can use two broad classes of data transformation: source field references or SQL transformation functions.

Source Field References

When you load data using a data pipeline, you reference extracted data using a special syntax named a source field reference. These expressions are either a named reference such as $my_field or a numeric field reference such as $1. In structured data formats like JSON, more complex source field references allow you to transform the structured data into the required form. For example, you can extract an array of values from an array of nested objects with an expression such as $data.items[].price. To learn more about transforming data with source field references, see:

Supported Transformation Functions in Data Pipelines

Data pipeline loading supports numerous SQL functions for use in transforming data during loading. You can use these transformation functions in the INTO ... SELECT portion of a pipeline. Transformation functions generally match the syntax and behavior of the function you use when you query in . The behavior might differ from querying behavior in two ways:
  • Some additional functions exist that provide behavior that does not exist in queries.
  • Some existing functions have extended behavior during loading that provides important capabilities that are not in queries.
The types of transformation functions supported in loading include:
  • Scalar data conversion and casting of data types
  • Special loading transformation functions
  • Date and time transformations
  • Character data transformations
  • Binary data transformations
  • Array data transformations
  • Logical operations transformations
  • Network type functions
  • Other data transformations
  • Custom user-defined Pipeline Functions using

Scalar Transformation Functions and Casting

Scalar transformation functions include constructors, scalar data conversions, and data-casting functions.

Special Data Pipeline Transformation Functions

Special data pipeline transformation functions include functions that only exist in loading, such as the METADATA function to load special data during pipeline execution.

Date and Time Transformation Functions

Date and time transformation functions provide utilities to parse, convert, or transform DATE, TIME, and TIMESTAMP values in pipelines.
For the TO_TIMESTAMP function, the Ocient formatter currently does not support variable-length sections of timestamps (i.e., the data might have a different number of fractions of seconds across records).For example, assume this source data.2024-01-01 12:00:00.1234562024-01-01 12:00:00.1234Then, you must specify the format_type as java and enter the DateTimeFormatter format string to parse the timestamps.

Character Data Transformation Functions

Character data transformation functions operate on VARCHAR data to transform a string of data.
When you use the SUBSTRING, RIGHT, and LEFT functions with Delimited or JSON formatted data sources, the Ocient System does not treat a source field reference (e.g., $your_field) as multi-byte character data. Each byte is treated as a single-byte ASCII character. To handle multi-byte character data like UTF-8 in a source field, you must cast the source field using CHAR($your_field) or use another function that returns CHAR data.When you use the LENGTH, CHAR_LENGTH, and CHARACTER_LENGTH functions with the SUBSTRING, RIGHT, and LEFT functions, you might experience unintended results for multi-byte characters, such as Arabic in UTF-8 if you do not cast the source field reference to CHAR.

Binary Data Transformation Functions

Binary data transformation functions operate on bytes provided when you use the BINARY format type in a pipeline. These functions are typically used in processing mainframe data outputs.

Array Data Transformation Functions

Logical Operations Transformation Functions

These transformation functions execute logical operations on the data in the data pipeline.

Network Type Functions

Network type functions are also supported in loading. For example, SUBNET(IP($9),13) AS ipv6_subnet_form1 in the CREATE PIPELINE SELECT SQL statement converts the input data in the column to an IPv6-mapped IPv4 address and then computes the prefix of size 13 for that address. For the supported network type functions, see Network Type Functions.

Other Data Transformation Functions

Other data transformation functions include the extraction of values from the JSON format and miscellaneous functions such as COALESCE, which are commonly used when working with data pipelines.

DEFAULT Keyword

You can use the DEFAULT keyword to include the configured default value of a column in transformation functions. Example
SQL

Lambda Functions

Lambda functions are a transformative tool in data pipelines, enabling declarative and highly flexible data transformations. By supporting per-element operations on arrays and nested data structures, lambda functions streamline data ingestion and reduce the need for post-processing. Their adoption enables you to handle complex, real-time data engineering scenarios natively. Lambda functions enable you to apply custom logic to each element of an array during ingestion. They support advanced operations like filtering and aggregation. You can embed transformation logic directly in the pipeline definition. This embedding reduces the need for additional processing steps after the load.

User-Defined Data Pipeline Functions

You can create a user-defined data pipeline function using the CREATE PIPELINE FUNCTION SQL statement and Groovy. After you create data pipeline functions, you can execute them in data pipelines like any other function to transform records. For more details, see CREATE PIPELINE FUNCTION and Data Types for User-Defined Data Pipeline Functions. Formatting Functions Data Types for Data Pipelines Data Formats for Data Pipelines Load Metadata and File-Based Partitioned Data in Data Pipelines Data Pipeline Load of JSON Data from Kafka Data Pipeline Load of Parquet Data from S3 Data Pipeline Load of CSV Data from S3
Last modified on May 20, 2026