Data Grid transform Icon Data Grid

Description

The Data Grid transform allows you to enter a static list of rows in a grid, similar to an in-pipeline spreadsheet. This is usually done for testing, reference or demo purposes.

Place a Data grid onto the data orchestration grid. On the Meta tab, add the field names and type and format. Then on the Data tab, add the field values for each data row.

Supported Engines

Hop Engine

Supported

Single Threaded

Supported

Native Spark

Supported

Beam Spark

Maybe Supported

Beam Flink

Maybe Supported

Beam Dataflow

Maybe Supported

Options

Meta tab

Field metadata (name, type and format masks) used to parse the strings on the Data tab. See Meta tab.

Data Tab

The grid of values. Every cell is a string. Hop converts each cell using the Type and Format of that column on the Meta tab.

Meta tab

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 output field (the column).

Type

Hop data type. Each Data-tab cell in this column is parsed into this type. See Data types.

The Data tab has one column per Meta-tab field and one row per output row. That is how you specify several different values. Do not try to put comma-separated values in a single cell; that is one string.

Metadata Injection Support

This transform supports metadata injection. It is made up out of 2 parts the meta (field definitions) and the data. The meta requires multiple rows to define the fields. The data part contains 2 injection fields, the first is a concatenated string that contains all values the second is the delimiter used to split that specific row. Mixing delimiters is possible, when empty "," is used as string to split with.

Limitations

It is not yet possible to insert columns in between 2 existing one or in general re-order the fields in the metadata tab.

If you plan to do this, make sure to copy the data section first to a spreadsheet (Select all rows and copy/paste the whole grid), change the data and copy it back into the data section.