Create Record Transformation

The Create Record transformation plugin is available in the Hub (Hierarchy Plugins).

Transform plugin generates hierarchical structures from flat schemas. You can use it to collapse flat data into structures.

Configuration

Property

Macro Enabled?

Description

Property

Macro Enabled?

Description

Mapping

Yes

Required. Specifies the mapping for generating the hierarchy.

Include fields missing in mapping

Yes

Required. Specifies whether the fields in the input schema that are not part of the mapping, should be carried over as-is.

Default is No.

Example

Let’s say we have two following data structure:

Field

Type

Field

Type

customer_id

Int

customer_profile

Record

– customer_name

String

– customer_phone

String

order_id

Int

product_id

Int

amount

Double

order_description

String

By setting the following mapping:

{ "id": ["customer_id"], "customer": { "name": ["customer_profile", "customer_name"], "phone": ["customer_profile", "customer_phone"] }, "orders": { "id": ["order_id"], "product_id": ["product_id"], "amount": ["amount"], "description": ["order_description"] } }

It will create target model will look like this:

Field

Type

Field

Type

customer_id

Int

– name

String

– phone

String

orders

Record

– id

Int

– product_id

Int

– amount

Double

– description

String

Created in 2020 by Google Inc.