09-19-2022 10:23 AM
Hi, very new to SnapLogic - i built a very simple pipeline to take data from from one server to another.
server1 – Mapper – server2
There is one field in the source database that is too big for the destination database
I was going to take a substring of that field - the code below worked
$FieldName.substring(1,8000)
however, there are null values in the source table.
I tried this - $FieldName.substring(1,8000) ==null?1
but cant get the syntax quite right.
Just looking to take the substring where its not null.
Thanks
09-19-2022 10:48 AM
The below ternary (what I believe you are attempting) should work:
$FieldName == null ? null : $FieldName.substring(0,8000)
Or - you could simply enable the “Null-safe access” property on the Mapper snap: