You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a globally-defined local variable from within a named projector, the FieldMapping containing the projector does not list the local variable as an argument. However, when doing the same from an anonymous block, the local variable is listed as an argument.
Example with named projector:
whistle:
var a: "a"
x1: {
y1: a
}
x2: foo()
def foo() {
y2: a
}
protobuf:
{
"root_mapping":{
"value_source":{
"const_string":"a"
},
"target_local_var":"a"
},
"root_mapping":{
"value_source":{
"projector":"foo" <==== the local variable isn't listed as an argument
},
"target_field":"x2"
},
"projector":{
"name":"foo",
"mapping":{
"value_source":{
"from_input":{
"arg":1
}
},
"target_field":"y2"
}
},
}
Example with anonymous block:
whistle:
var a: "a"
x1: {
y1: a
}
protobuf:
{
"root_mapping":{
"value_source":{
"const_string":"a"
},
"target_local_var":"a"
},
"root_mapping":{
"value_source":{
"from_local_var":"a", <=== the local variable is listed as an argument
"projector":"$anonblock_3_3"
},
"target_field":"x1"
},
"projector":{
"name":"$anonblock_3_3",
"mapping":{
"value_source":{
"from_input":{
"arg":1
}
},
"target_field":"y1"
}
}
}
The text was updated successfully, but these errors were encountered:
When using a globally-defined local variable from within a named projector, the FieldMapping containing the projector does not list the local variable as an argument. However, when doing the same from an anonymous block, the local variable is listed as an argument.
Example with named projector:
whistle:
protobuf:
Example with anonymous block:
whistle:
protobuf:
The text was updated successfully, but these errors were encountered: