How to block dataiku dataset from formatting date values?

mi6crazyheart
mi6crazyheart Registered Posts: 7 ✭✭✭

I've some date values which get automatically format when I pass that through dataiku dataset. I don't want to format those dates. I just want them in the same format in which they are before formatting.

Before formatting

before-format.png

After formatting

after-format.png


Operating system used: windows

Best Answer

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

    Hi,

    Is this an SQL dataset?

    DSS would typically change the format automatically unless you parse the data in the prepare recipe.

    https://doc.dataiku.com/dss/latest/preparation/dates.html

    If you want to keep the original format simply change the type to "string" in your dataset schema instead of date type and DSS will keep it as a string or remove the Read SQL "date" as DSS option in the input dataset settings.

    Screenshot 2022-05-20 at 13.13.34.png

    If you want to convert it from the parsed format back to MM/dd/yyyy you can do so with prepare processor( Format date with custom format) and se the type to string.

    Screenshot 2022-05-20 at 13.16.30.png


    Hope that helps!

Answers

  • mi6crazyheart
    mi6crazyheart Registered Posts: 7 ✭✭✭

    Hi AlexT, Thanks for your reply. I've fixed this by mentioning the datatype of dataframe's columns names.

    Ex: bucketOutput_df = bucketOutput_df.astype({"bucketStatusDate": str, "bucketSpudDate": str})

    By the way, I was reading the data from an EXCEL sheet.

    I was reading from an EXCEL sheet & trying to put that to Dataiku dataset.

Setup Info
    Tags
      Help me…