P.S. You can also create some multi step process:
1. Import with js:%external%.toString().length==3 ? "X" : "N"
2. Export the dimension to some fixed text file.
3. Import again with different transformation and without conversion:
MAPPING
...
TID=*if(TID = *str(N) then *str(); *str(Y))
...