Add "asStr" as a Formula Language Function

Options
tgb417
tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,595 Neuron

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.
1
1 votes

New · Last Updated

Comments

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,727 Neuron
    Options

    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.

  • tgb417
    tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,595 Neuron
    Options

    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.

  • tgb417
    tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,595 Neuron
    Options

    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.

Setup Info
    Tags
      Help me…