SetPrimitiveValueNodeConfiguration
Namespace: Meshmakers.Octo.Sdk.Common.EtlDataPipeline.Nodes.Extracts
Configuration for a node that sets primitive values at specified paths in the data context.
public record SetPrimitiveValueNodeConfiguration : TargetPathNodeConfiguration, INodeConfiguration, IEquatable<NodeConfiguration>, ITargetPathNodeConfiguration, IEquatable<TargetPathNodeConfiguration>, IEquatable<SetPrimitiveValueNodeConfiguration>
Inheritance Object → NodeConfiguration → TargetPathNodeConfiguration → SetPrimitiveValueNodeConfiguration
Implements INodeConfiguration, IEquatable<NodeConfiguration>, ITargetPathNodeConfiguration, IEquatable<TargetPathNodeConfiguration>, IEquatable<SetPrimitiveValueNodeConfiguration>
Remarks:
The SetPrimitiveValueNode provides the capability to inject static primitive values into the data pipeline at any specified JSONPath location. This node is essential for data enrichment, default value assignment, constants injection, and data structure initialization within ETL processes.
Key capabilities include:
- Setting primitive values (strings, numbers, booleans, dates, arrays) at any JSONPath location
- Automatic type conversion from the source value to the target primitive type
- Support for all major primitive data types and their array equivalents
- Culture-invariant parsing for numeric values to ensure consistency across different locales
- Integration with the target path configuration system for flexible value placement
This node is particularly useful for:
- Adding metadata timestamps or processing markers
- Setting default values for optional fields
- Injecting configuration constants into data records
- Initializing computed fields with base values
- Adding version numbers or processing identifiers
Properties
Value
Gets or sets the primitive value that will be converted and assigned to the target path.
public object Value { get; set; }
Property Value
Object
The source value to be converted and assigned to the target path.
Remarks:
This value undergoes automatic type conversion based on the SetPrimitiveValueNodeConfiguration.ValueType property. The conversion process supports standard .NET type conversions plus specialized handling for culture-invariant numeric parsing.
The value can be provided in various formats:
- Direct primitive values (strings, numbers, booleans)
- String representations that can be parsed to the target type
- Array values for array target types
- DateTime strings in ISO 8601 format for DateTime types
For numeric types (Double), string values are parsed using invariant culture to ensure consistent behavior regardless of the system's regional settings.
ValueType
Gets or sets the target primitive type that the SetPrimitiveValueNodeConfiguration.Value will be converted to before assignment.
public AttributeValueTypesDto ValueType { get; set; }
Property Value
AttributeValueTypesDto
The target primitive type for value conversion. Defaults to .
Remarks:
This property determines how the SetPrimitiveValueNodeConfiguration.Value will be interpreted and converted during processing. The conversion process uses .NET's standard type conversion mechanisms with specialized handling for certain types to ensure reliable and predictable behavior.
Supported primitive types include:
- : Text values
- : 32-bit integers
- : 64-bit integers (long)
- : Double-precision floating-point numbers (culture-invariant parsing)
- : Boolean true/false values
- : Date and time values
- : Time duration values
- : Byte values
- : Arrays of strings
- : Arrays of integers
Note: Complex types (Record, RecordArray, Enum, DateTimeOffset, GeospatialPoint, BinaryLinked) are not supported by this node and will result in a PipelineExecutionException.
ValuePath
Gets or sets the JSONPath expression used to dynamically retrieve the value from the data context.
public string ValuePath { get; set; }
Property Value
String
A JSONPath expression string that selects the source value from the data context,
or null to use the static SetPrimitiveValueNodeConfiguration.Value property.
Remarks:
When specified, this path is evaluated against the root data context to retrieve the source value instead of using the static SetPrimitiveValueNodeConfiguration.Value property. This enables dynamic value assignment where the source value depends on other data in the current processing context.
The ValuePath provides powerful capabilities for:
- Copying values from one location to another within the same data context
- Creating computed fields based on existing data
- Implementing conditional value assignment using data-driven logic
- Centralizing configuration values that can be referenced by multiple nodes
Priority: If both SetPrimitiveValueNodeConfiguration.Value and SetPrimitiveValueNodeConfiguration.ValuePath are specified, SetPrimitiveValueNodeConfiguration.ValuePath takes precedence and SetPrimitiveValueNodeConfiguration.Value is ignored.
TargetPath
Gets or sets the target path in json path format
public string TargetPath { get; set; }
Property Value
TargetValueWriteMode
Gets or sets the writing mode (overwrite, append, prepend)
public TargetValueWriteModes TargetValueWriteMode { get; set; }
Property Value
TargetValueKind
Gets or sets the value kind to write (simple value or array)
public ValueKinds TargetValueKind { get; set; }
Property Value
DocumentMode
Gets or sets the document mode (extend, replace)
public DocumentModes DocumentMode { get; set; }
Property Value
Description
Gets or sets an optional description
public string Description { get; set; }
Property Value
Constructors
SetPrimitiveValueNodeConfiguration()
Caution
Constructors of types with required members are not supported in this version of your compiler.
public SetPrimitiveValueNodeConfiguration()