Skip to main content

GetPipelineConfigByCkTypeId@1

Node GetPipelineConfigByCkTypeId@1 is used to retrieve all pipeline configurations from the global configuration that match a specified CkTypeId.

Unlike GetPipelineConfigByWellKnownName@1 which retrieves a single configuration, this node retrieves all configurations that share the same CkTypeId and returns them as an array. This is useful when you need to process multiple configurations of the same type.

Adapter Prerequisites

Node Configuration

For fields targetPath, targetValueWriteMode, and targetValueKind, see Overview. Field path is not used in this node.

Either ckTypeId or ckTypeIdPath must be specified:

  • Use ckTypeId when the CkTypeId is a static value known at design time
  • Use ckTypeIdPath when the CkTypeId should be read dynamically from the data context
transformations:
- type: GetPipelineConfigByCkTypeId@1 # Get all pipeline configurations by CkTypeId
targetPath: $.configs # Path where the pipeline configurations array should be stored in the payload
ckTypeId: MyNamespace/MyConfigType # The CkTypeId to search for (static value)
# OR
ckTypeIdPath: $.configTypeId # JSON path to get the CkTypeId from the input data (dynamic value)

Usage Example

Here's an example of how you might use the GetPipelineConfigByCkTypeId@1 node in a transformation pipeline. In this example, the node retrieves all pipeline configurations of a specific type and iterates over them for processing.

triggers:
- type: FromExecutePipelineCommand@1
transformations:
# Retrieve all pipeline configurations of a specific type
- type: GetPipelineConfigByCkTypeId@1
ckTypeId: DataIntegration/MappingConfig
targetPath: $.mappingConfigs
# Iterate over each configuration
- type: ForEach@1
path: $.mappingConfigs
transformations:
# Process each mapping configuration
- type: Logger@1
path: $
message: "Processing mapping configuration"
- type: DataMapping@1
path: $.sourceData
targetPath: $.mappedData
mappingConfigPath: $.mappings

Example with Dynamic CkTypeId

triggers:
- type: FromHttpRequest@1
transformations:
# Set the CkTypeId dynamically based on request parameters
- type: SetPrimitiveValue@1
valuePath: $.request.configType
targetPath: $.searchType
# Retrieve all configurations matching the type
- type: GetPipelineConfigByCkTypeId@1
ckTypeIdPath: $.searchType
targetPath: $.configurations
# Return the configurations count
- type: Map@1
path: $.configurations
targetPath: $.response.configCount
expression: "length(@)"