How to convert an integer to a text

Options
LaurentS
LaurentS Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 21 ✭✭✭✭

Hello,

I am seeking for the equivalent syntax / method or Dataiku to convert an integer in a text. I am seeking for the equivalent python syntax "str(integer_value)" to be used in Dataiku

Thanks and kindest regards

Best Answer

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,209 Dataiker
    Answer ✓
    Options

    Hi Laurent,

    I assume you are looking for a way to convert integer to text in DSS formula? For example as part of Prepare recipe correct?

    https://doc.dataiku.com/dss/latest/formula/index.html

    There are 2 functions that should help here :

    toString(column_name)

    strval("column_name") #must use quotes for strval

    Please note toString will drop leading 0's as explained here

    By default, we will try auto-detect the meaning but you can change this to "Text" manually.

    Screenshot 2021-08-04 at 13.00.16.pngScreenshot 2021-08-04 at 13.00.33.png

    Let me know if this helps!

Answers

Setup Info
    Tags
      Help me…