Skip to main content

Is it possible to convert a string to a numeric in a rules engine setup step? 

My scenario:

I have a string that is prefixed by numerics (e.g. ‘20.This is the string’).  I can strip the numeric part off by using the left function, but then I want to use that value in a case statement using ranges of numbers, e.g. If A > 1 and A < 10….   

 

Since the value is a string, it sorts like 1, 100, 2, 210 etc, and my range selections don’t work.

If I could cast the string to a numeric then I would be able to use numeric ranges.  Any thoughts on how to do this?

Hi @mary_taylor 

We do not have a direct way to cast to String. Current workaround is to export to S3 in one task and reimport from S3 with a different data type.


Reply