Add "asStr" as a Formula Language Function

User Story:

As a data analyst who frequently works with strings that look like numbers for example 00 or 08404, it would be useful to have a formula function like asBool() or asDate() that would keep auto typing from happening and enter these values in a column as a string not a number.

Conditions of Satisfaction:

  • Clear documentation on the new feature.
  • Does not break existing formulas (or breaks as few as possible.)

Notes:

  • This might be called something like asStr() or update strval() to work on calculated value or constant values not just column references as it appears to work now.
--Tom
3 Comments

I am curious where do you see this issue. Where do you type these strings that look like numbers and they are auto-corrected? In an editable dataset if the column is string then it doesn't do any auto correction.

I am curious where do you see this issue. Where do you type these strings that look like numbers and they are auto-corrected? In an editable dataset if the column is string then it doesn't do any auto correction.

But when Dataiku sees something that looks like a number it will often change the value to a number column.  Even though I want to keep it as a string.  I'm specifically referring to the Formula step in visual recipes.  And example might be when you want to break a US Zip +4 into the  Zip and the Plus 4.  The leading zeros have meaning.

 

--Tom

But when Dataiku sees something that looks like a number it will often change the value to a number column.  Even though I want to keep it as a string.  I'm specifically referring to the Formula step in visual recipes.  And example might be when you want to break a US Zip +4 into the  Zip and the Plus 4.  The leading zeros have meaning.

 

My current work around for this is to use the Format() command.  It works but is not very intuitive to find this when you run into this challange.

 

--Tom

My current work around for this is to use the Format() command.  It works but is not very intuitive to find this when you run into this challange.