Add Constants Icon Add Constants

Description

The Add Constant Values transform is a simple and high performance way to add constant values to a pipeline stream.

Supported Engines

Hop Engine

Supported

Single Threaded

Supported

Native Spark

Supported

Beam Spark

Supported

Beam Flink

Supported

Beam Dataflow

Supported

Options

Option Description

Transform name

Name of the transform. Note: This name has to be unique in a single pipeline.

Fields

Name, type and constant Value for each field to add. The value is entered as a string and converted with the format metadata on the same row. See Fields.

Fields

The columns below appear on many field tables. They are field metadata: they control how Hop converts a string to a typed value, and how a typed value is written back to a string. They do not change the value stored in a database.

Column Description

Format / Conversion mask

Number or date pattern used to parse and print the value. See Formatting numbers and dates.

Length

String: maximum characters. Number / BigNumber: significant digits. Integer: display width (leading zeros when writing). Date: length of the printed string (for example 4 prints only the year). Use -1 when unset.

Precision

Decimal digits after the radix for Number and BigNumber. Not used for String, Date or Boolean.

Decimal

Character that separates the integer and fractional parts. . in 10,000.00 (US) or , in 10.000,00 (DE).

Group / Grouping

Thousands grouping symbol. , in 10,000.00 (US) or . in 10.000,00 (DE). This is not a row group or category.

Currency

Optional currency symbol used when the format mask contains a currency sign (¤). Examples: $, .

Value

A single constant, entered as a string and parsed with Type, Format, Decimal, Group and Currency. Not a comma-separated list of values. Use Data Grid when you need several different rows.

Set empty string?

When the constant is empty, emit an empty string ("") instead of null.

Column Description

Name

Name of the constant field added to every input row.

Type

Hop data type of the constant. See Data types.

Value is a single constant per field. Group is the thousands separator, not a row group.