When extracting date components from a date, year changes from double integer to double decimal

Solved!
meanrj
Level 2
When extracting date components from a date, year changes from double integer to double decimal

when extracting the date components from a date in a prepare recipe, it shows as being a double integer format but once i run the recipe, the ouput dataset has the year column as a double decimal format. 

is there any way to keep it as a double integer?

i have tried a formula to format it and tried to round the date with no luck

thanks!


Operating system used: Windows 11

-RJ
0 Kudos
1 Solution
Turribeach

Have a read:

https://community.dataiku.com/t5/Using-Dataiku/DataIku-messes-up-storage-types-in-visual-recipe/m-p/...

I am guessing you have some data not shown in your sample that is causing Dataiku to change the storage type fo your columns.

View solution in original post

6 Replies
Turribeach

I can't reproduce your issue. Please post how you are extracting the components from the date. I have a Date field in a Prepare recipe, I click on its column heading and select "Extract dat components". Dataiku will then extract the fields as bigint (see screen shot below).

Also I think you are confusing the storage type with the meaning in Dataiku so I recommend you read this part of the documentation. In general you should be concerned with the storage type (top).

Capture.PNG

0 Kudos
meanrj
Level 2
Author

after double checking, the problem isnt from the 'extract date components', its from the next prepare recipe that the format changes. but in this recipe there is no work done on the year column

-RJ
0 Kudos
Turribeach

What is the storage type of the columns when they are extracted? Again I can't reproduce what you say it's happening. My columns are gigint and remain always bigint. Also your column names suggest you may be extracting the values manually. Please confirm exactly how you extract the date components.

0 Kudos
meanrj
Level 2
Author

extracting the date component, and the month and year column shows up as string integer/bigint integer respectively.

 

after this prepare recipe, there are other recipes used on this dataset, none of which do anything to to year column.

the dataset is then shared to another work zone and on the second prepare recipe, the format changes to double decimal.

-RJ
0 Kudos
meanrj
Level 2
Author

i cant show the actual data due to confidentiality concerns.

 

-RJ
0 Kudos
Turribeach

Have a read:

https://community.dataiku.com/t5/Using-Dataiku/DataIku-messes-up-storage-types-in-visual-recipe/m-p/...

I am guessing you have some data not shown in your sample that is causing Dataiku to change the storage type fo your columns.