Transforming missing values


#1
  1. It seems that this type of construction is not working for transforms: "exists(USD_AMT) ? {value: USD_AMT, currency: {id: 'USD'}} : null".

Is this expected? is there a workaround?

  1. If I want to transform a value to a reference field {id: ‘A’} and ‘A’ is null, will it create an empty reference {} or will it not create a reference?

#2

This is weird, it should be working! Are you getting in error during provisioning or when you send data


#3

not getting errors, just not transforming the data


#4

Salut Romain,

  1. a possible workaround would be to create 2 transforms, with different conditions:
    1.1 The first transform uses @canonicalTransform(condition="exists(USD_AMT)") in which you can use your mapping {value: USD_AMT, currency: {id: 'USD'}}
    1.2 The second transform uses @canonicalTransform(condition="!exists(USD_AMT)") where you map your reference field with null
  2. If your transform expression is {id: "A"} and A is null, then the result will be {id: ""}, so I believe it will create an empty reference.