Field functions
The Field functions feature in Gluesync allows you to define custom transformation expressions on database fields during data replication. Instead of relying on complex custom scripts, Gluesync provides a library of pre-built, high-performance transformations directly inside the Control Plane.
These transformations can be configured individually per column from the Fields Editor.
Overview
When replicating data between different database engines (such as Oracle to Couchbase, or PostgreSQL to SingleStore), schema definitions and data representations often differ. Gluesync field functions address these differences by enabling field-level transformations in transit.
If none of the pre-built transformations fits your case, or if a target column has to be built from several source columns at once, you can call a function of your own instead. See Custom Field Functions.
Field functions are divided into two main categories:
-
Regular column transformations: Applied to existing fields coming from the source database. They transform the business data before writing it to the target (e.g., converting a numeric field to a decimal, trimming whitespace, or formatting a date into a string).
-
Technical field transformations: Applied to generate metadata (such as execution timestamps) or to assign fixed constant values. These functions can be used to populate target-only fields, or applied directly to mapped source fields to override the original incoming data (e.g., for data masking, anonymization, or hardcoding specific states).
Key capabilities
-
No-code transformations: Perform type casting, date formatting, and string manipulation without writing custom code or scripts.
-
Visual setup: Add and edit transformations directly inside the Fields Editor.
-
Sensible defaults: Every transformation requiring custom parameters (like formatting patterns or character encodings) comes pre-populated with standard, ready-to-use defaults.
Supported field functions
Gluesync supports a variety of pre-built transformations grouped into logical categories.
Date and time to string
These functions convert date and time data types into formatted text.
| Function | Description | Default pattern |
|---|---|---|
Convert Date to String |
Formats a local date value as text. |
|
Convert Time to String |
Formats a local time value as text. |
|
Convert Date and Time to String |
Formats a local date and time value as text. |
|
Convert Time with Offset to String |
Formats a time value that includes a timezone offset as text. |
|
Convert Date and Time with Offset to String |
Formats a date and time value that includes a timezone offset as text. |
|
String to date and time
These functions parse text representations of dates and times into native temporal types on the target database.
| Function | Description | Default pattern |
|---|---|---|
Convert String to Date |
Parses a date written as text. |
|
Convert String to Time |
Parses a time written as text. |
|
Convert String to Date and Time |
Parses a combined date and time written as text. |
|
Convert String to Time with Offset |
Parses a time and timezone offset written as text. |
|
Convert String to Date and Time with Offset |
Parses a combined date, time, and timezone offset written as text. |
|
Numeric and decimal conversions
These functions cast numbers between standard decimals (BigDecimal), other numeric representations, and strings.
| Function | Description |
|---|---|
Convert Decimal to Short |
Converts a decimal value to a short integer. |
Convert Decimal to Int |
Converts a decimal value to a standard integer. |
Convert Decimal to Long |
Converts a decimal value to a long integer. |
Convert Decimal to Float |
Converts a decimal value to a single-precision floating-point number. |
Convert Decimal to Double |
Converts a decimal value to a double-precision floating-point number. |
Convert Decimal to Short (Exact) |
Converts a decimal value to a short integer, throwing an exception if the conversion is not exact. |
Convert Decimal to Int (Exact) |
Converts a decimal value to an integer number, throwing an exception if the conversion is not exact. |
Convert Decimal to Long (Exact) |
Converts a decimal value to a long integer, throwing an exception if the conversion is not exact. |
Short to Convert Decimal |
Converts a short integer to a decimal value. |
Int to Convert Decimal |
Converts a standard integer to a decimal value. |
Long to Convert Decimal |
Converts a long integer to a decimal value. |
Float to Convert Decimal |
Converts a single-precision floating-point number to a decimal value. |
Double to Convert Decimal |
Converts a double-precision floating-point number to a decimal value. |
Convert String to Decimal |
Parses a string representation of a decimal number into a decimal value. |
Text and binary operations
These functions handle text cleanup, encoding/decoding, UUID conversions, and numeric/decimal serialization.
| Function | Description | Default parameter |
|---|---|---|
Byte Array to String |
Decodes binary data (byte array) into a string representation. |
|
String to Byte Array |
Encodes a string into binary data (byte array). |
|
Convert UUID String to Byte Array |
Converts a 36-character UUID string (with hyphens) into a 16-byte array representation. |
N/A |
Convert Byte Array to UUID String |
Converts a 16-byte array representation back into its 36-character UUID string representation (with hyphens). |
N/A |
Trim String |
Trims leading and trailing whitespace characters from a string value. |
N/A |
Convert Short to String |
Converts a short number value to its string representation. |
N/A |
Convert Int to String |
Converts an integer number value to its string representation. |
N/A |
Convert Long to String |
Converts a long number value to its string representation. |
N/A |
Convert Float to String |
Converts a float number value to its string representation. |
N/A |
Convert Double to String |
Converts a double number value to its string representation. |
N/A |
Convert Decimal to String |
Converts a decimal value to its string representation. |
N/A |
Boolean conversions
These functions cast boolean values to and from numeric and string representations.
| Function | Description |
|---|---|
Convert Boolean to Short |
Converts a boolean value to a short: |
Convert Boolean to Int |
Converts a boolean value to an integer: |
Convert Boolean to Long |
Converts a boolean value to a long: |
Convert Boolean to Decimal |
Converts a boolean value to a decimal value: |
Convert Boolean to String (T/F) |
Converts a boolean value to a single-character string: |
Convert Boolean to String (true/false) |
Converts a boolean value to its string representation: |
Convert Boolean to String (Y/N) |
Converts a boolean value to a single-character string: |
Convert Short to Boolean |
Converts a short number value to a boolean value (1 is |
Convert Int to Boolean |
Converts an integer number value to a boolean value (1 is |
Convert Long to Boolean |
Converts a long number value to a boolean value (1 is |
Convert Decimal to Boolean |
Converts a decimal value to a boolean value (1 is |
Convert String to Boolean |
Parses a string value representing a truthy/falsy condition to a boolean. Converts |
Technical fields and constants
These functions generate automatic values or fixed constants on target records. They are typically applied to target-only metadata columns.
| Function | Description | Default parameter |
|---|---|---|
Local Timestamp |
Generates a local timestamp representing the current system date and time performing the replication. |
N/A |
Local Date |
Generates a local date representing the current system date performing the replication. |
N/A |
Timestamp with Offset |
Generates the current date and time with a specific timezone offset. |
|
Fixed short number |
Assigns a static, pre-defined short integer value to all records. |
|
Fixed integer number |
Assigns a static, pre-defined integer value to all records. |
|
Fixed long number |
Assigns a static, pre-defined long integer value to all records. |
|
Fixed float number |
Assigns a static, pre-defined decimal float value to all records. |
|
Fixed double number |
Assigns a static, pre-defined double-precision float value to all records. |
|
Fixed big decimal number |
Assigns a static, pre-defined decimal value to all records. |
|
Fixed string |
Assigns a static, pre-defined text value to all records. |
|
Record ID |
Generates a 64-bit ID from the concatenation of the values of the primary key columns. |
N/A |
Advanced date and time operations
These functions perform timezone adjustments, combine partial dates/times, or add missing date or time components using current system values.
| Function | Description | Default parameter |
|---|---|---|
Convert Date to Date and Time adding Time |
Converts a date field into a full timestamp by adding the current system time. |
N/A |
Convert Time to Date and Time adding Date |
Converts a time field into a full timestamp by adding the current system date. |
N/A |
Convert Offset Time to Offset Date and Time adding Date |
Converts a time field that has a timezone offset into a full timestamp by adding the current system date. |
N/A |
Convert Date to Offset Date and Time adding Offset Time |
Converts a date field into a full timestamp with timezone by adding the current system offset time. |
N/A |
Convert Offset Date and Time to Offset Time |
Extracts just the time and offset components from a full timezone-aware timestamp. |
N/A |
Convert Offset Date and Time to Date |
Extracts just the date component from a full timezone-aware timestamp. |
N/A |
Convert Offset Date and Time to Date and Time |
Extracts just the date and time components from a timezone-aware timestamp, discarding the timezone details. |
N/A |
Convert Date to Date and Time adding Parsed Time |
Converts a date into a full timestamp by combining it with a specific time that you define. |
|
Convert Time to Date and Time adding Parsed Date |
Converts a time into a full timestamp by combining it with a specific date that you define. |
|
Convert Date and Time to Offset Date and Time with Zone |
Converts a timestamp into a timezone-aware timestamp by applying a specific timezone. |
|
Data masking and anonymization
Data masking protects sensitive data in transit by replacing a portion of the original value with a fixed character (such as *). The structure, length, and separator characters of the original value (such as dashes, spaces, underscores) are typically preserved exactly as they appear in the source.
| Function | Description | Behavior | Default mask character |
|---|---|---|---|
Mask Credit Card |
Masks credit card numbers inside a string, leaving only the last block of numbers visible. Any separator characters between digit groups (such as |
|
|
Mask String |
Masks strings by keeping only the first letter of each word and replacing all other letters with the mask character. |
|
|
Mask Email |
Masks email addresses inside a string, leaving only the domain and the first character of the mailbox name visible. |
|
|
Mask Phone |
Masks telephone numbers inside a string, leaving only the prefix and the last four digits visible. Works with international prefixes, spaces, dashes, and parentheses. |
|
|
Mask IBAN |
Masks IBAN account numbers inside a string, leaving only the first four and last four characters visible. |
|
|
YAML expression type reference
When configuring field functions through the Bootstrapper or pipeline YAML exports, each function is identified by a technical type string. The following table maps each field function to its corresponding YAML type value and available parameters.
| Category | Function | YAML type |
Parameters |
|---|---|---|---|
Temporal to String |
Convert Date to String |
|
|
Convert Time to String |
|
|
|
Convert Date and Time to String |
|
|
|
Convert Time with Offset to String |
|
|
|
Convert Date and Time with Offset to String |
|
|
|
String to Temporal |
Convert String to Date |
|
|
Convert String to Time |
|
|
|
Convert String to Date and Time |
|
|
|
Convert String to Time with Offset |
|
|
|
Convert String to Date and Time with Offset |
|
|
|
Numeric Casting |
Convert Decimal to Short |
|
None |
Convert Decimal to Int |
|
None |
|
Convert Decimal to Long |
|
None |
|
Convert Decimal to Float |
|
None |
|
Convert Decimal to Double |
|
None |
|
Convert Decimal to Short (Exact) |
|
None |
|
Convert Decimal to Int (Exact) |
|
None |
|
Convert Decimal to Long (Exact) |
|
None |
|
Short to Convert Decimal |
|
None |
|
Int to Convert Decimal |
|
None |
|
Long to Convert Decimal |
|
None |
|
Float to Convert Decimal |
|
None |
|
Double to Convert Decimal |
|
None |
|
Convert String to Decimal |
|
None |
|
Text & Binary |
Byte Array to String |
|
|
String to Byte Array |
|
|
|
Convert UUID String to Byte Array |
|
None |
|
Convert Byte Array to UUID String |
|
None |
|
Trim String |
|
None |
|
Convert Short to String |
|
None |
|
Convert Int to String |
|
None |
|
Convert Long to String |
|
None |
|
Convert Float to String |
|
None |
|
Convert Double to String |
|
None |
|
Convert Decimal to String |
|
None |
|
Boolean Casting |
Convert Boolean to Short |
|
None |
Convert Boolean to Int |
|
None |
|
Convert Boolean to Long |
|
None |
|
Convert Boolean to Decimal |
|
None |
|
Convert Boolean to String (T/F) |
|
None |
|
Convert Boolean to String (true/false) |
|
None |
|
Convert Boolean to String (Y/N) |
|
None |
|
Convert Short to Boolean |
|
None |
|
Convert Int to Boolean |
|
None |
|
Convert Long to Boolean |
|
None |
|
Convert Decimal to Boolean |
|
None |
|
Convert String to Boolean |
|
None |
|
Technical & Constants |
Local Timestamp |
|
None |
Local Date |
|
None |
|
Timestamp with Offset |
|
|
|
Fixed short number |
|
|
|
Fixed integer number |
|
|
|
Fixed long number |
|
|
|
Fixed float number |
|
|
|
Fixed double number |
|
|
|
Fixed big decimal number |
|
|
|
Fixed string |
|
|
|
Record ID |
|
None |
|
Advanced Temporal |
Convert Date to DateTime adding Time |
|
None |
Convert Time to DateTime adding Date |
|
None |
|
Convert Offset Time to Offset DateTime adding Date |
|
None |
|
Convert Date to Offset DateTime adding Offset Time |
|
None |
|
Convert Offset DateTime to Offset Time |
|
None |
|
Convert Offset DateTime to Date |
|
None |
|
Convert Offset DateTime to DateTime |
|
None |
|
Convert Date to DateTime adding Parsed Time |
|
|
|
Convert Time to DateTime adding Parsed Date |
|
|
|
Convert DateTime to Offset DateTime with Zone |
|
|
|
Data Masking |
Mask Credit Card |
|
|
Mask String |
|
|
|
Mask Email |
|
|
|
Mask Phone |
|
|
|
Mask IBAN |
|
|
Configuration in the fields editor
You can configure and customize field functions directly inside the visual Control Plane interface.
-
Open your replication pipeline in the Objects Browser and navigate to the Fields tab.
-
Locate the column you want to transform.
-
Scroll to the Field Function section for that column (or create a target-only technical column first).
-
Click on the Select Expression dropdown and use the search bar to locate your preferred transformation.
-
If the chosen function requires custom parameters (such as a date pattern), an additional text input field labeled Value / Pattern will appear:
-
You can accept the pre-filled default value, or type your own custom pattern, timezone, or constant.
-
-
Click Save to update the pipeline configuration.
|
When applying field functions to a pipeline that is already active, saving the configuration may require a pipeline restart or target table synchronization if new columns are introduced. |