ScriptArgument
Namespace: Meshmakers.Octo.Sdk.Common.EtlDataPipeline.Nodes.Transforms
Argument configuration for passing values to C# script
public record ScriptArgument : IEquatable<ScriptArgument>
Inheritance Object → ScriptArgument
Implements IEquatable<ScriptArgument>
Properties
Name
Name of the variable in the C# script
public string Name { get; set; }
Property Value
ValuePath
JSON path to get the value (e.g. "$.demo.path")
public string ValuePath { get; set; }
Property Value
Value
Fixed value to use (alternative to ValuePath)
public object Value { get; set; }
Property Value
DataType
Data type of the argument
public AttributeValueTypesDto DataType { get; set; }
Property Value
AttributeValueTypesDto
Optional
Marks the argument as optional: when ScriptArgument.ValuePath does not exist in the data context, the script receives ScriptArgument.DefaultValue (without one, the default of the declared C# type: null, 0, false or DateTime.MinValue) and no warning is logged (debug level only). Without it, a missing path is reported once per pipeline execution as one aggregated warning with the number of records it was missing in.
public Nullable<bool> Optional { get; set; }
Property Value
Remarks:
Nullable on purpose: the pipeline YAML deserializer writes null for a key that is present without a value, and an absent or null value means "not optional".
DefaultValue
Value the script receives when ScriptArgument.ValuePath does not exist or holds null (without one, the script variable gets the default of its declared C# type: null for strings and arrays, 0, false or DateTime.MinValue for value types). Must be convertible to ScriptArgument.DataType; an inconvertible value fails the node on every execution.
public object DefaultValue { get; set; }
Property Value
Constructors
ScriptArgument()
Caution
Constructors of types with required members are not supported in this version of your compiler.
public ScriptArgument()