Decimal point restriction

Chandrima
Chandrima Registered Posts: 6 ✭✭

How to restrict the decimal values upto 4 decimal places in all the double decimal type column in dataiku

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,407 Neuron
    edited March 29

    There is no way to do this for all columns. You have two ways to do this for each column:

    Format to 4 decimals and convert back to Number:

    toNumber(format("%.4f", Double_Number))
    

    Use multiplication and division by 100000 before and after using the round() function to round to 4 digits:

    (round([my_column]*100000))/100000
    

    However it will be best if Dataiku supported the way most other languages implement this usually using a round() function and passing the number of decimals to round to. You can vote for this product idea here.

Setup Info
    Tags
      Help me…