ComponentMappingDefinition
(This component is experimental. Use at your own risk.) Specifies a mapping definition to update or add fields in a record or configuration. This allows dynamic mapping of data by interpolating values into the template based on provided contexts.
- type:
object - required:
["type","field_path","value"]
type
- Required: Yes
- type:
string - enum:
["ComponentMappingDefinition"]
field_path
A list of potentially nested fields indicating the full path where value will be added or updated.
- Required: Yes
- type:
array - Available variables:
config,components_values,stream_slice,stream_template_config
Examples:
- name
- retriever
- requester
- url
- retriever
- requester
- '{{ components_values.field }}'
- '*'
- '**'
- name
-
items:
- type:
string
- type:
value
The dynamic or static value to assign to the key. Interpolated values can be used to dynamically determine the value during runtime.
- Required: Yes
- type:
string - Available variables:
config,stream_template_config,components_values,stream_slice
Examples:
{{ components_values['updates'] }}
{{ components_values['MetaData']['LastUpdatedTime'] }}
{{ config['segment_id'] }}
{{ stream_slice['parent_id'] }}
{{ stream_slice['extra_fields']['name'] }}
value_type
The expected data type of the value. If omitted, the type will be inferred from the value provided.
- Required: No
- Allowed type:
ValueType
create_or_update
Determines whether to create a new path if it doesn't exist (true) or only update existing paths (false). When set to true, the resolver will create new paths in the stream template if they don't exist. When false (default), it will only update existing paths.
- Required: No
- type:
boolean - default:
false
condition
A condition that must be met for the mapping to be applied. This property is only supported for ConfigComponentsResolver.
- Required: No
- type:
string - Available variables:
config,stream_template_config,components_values,stream_slice
Examples:
{{ components_values.get('cursor_field', None) }}
{{ '_incremental' in components_values.get('stream_name', '') }}
$parameters
- Required: No
- type:
object