Basic 102 course > chapter "Hands-On: Group the Data > new file has wrong columns type
Hello, on basic 102 course, chapter "Hands-On: Group the Data" (https://academy.dataiku.com/basics-102/497966) I have a problem with columns' type.
All columns of initial orders_prepared dataset have a right type.
After applying a group recipe, the storage type of columns in the “Per field aggregations” is now different. For example I have a string type for order_date field and a min function is not applicable.
How to solve it please?
Thanks a lot.
Théo.
Best Answers
-
Hi titouan3412,
Your first screenshot confirms that your order_date column is actually being stored as a string, not a date type. You can tell because the "first" value says string, which corresponds to the actual storage type of the column in your dataset, while the "second" value refers to the meaning of the column. More information about the differences between storage type and meanings can be found in our documentation here:
https://doc.dataiku.com/dss/latest/schemas/index.html
I would recommend following the steps laid out in the "prepare your data" section of the Academy tutorial to parse the date (as a new column), delete the original order_date column, and rename the new order_date_parsed column. You can find the instructions here:
https://academy.dataiku.com/basics-102/497955
Afterwards, your order_date column should have the storage type and meaning as both "date". Please see the following screenshot for what this should look like.
Once the column is actually being stored as a date (and not a string), you should be able to properly use the "min" and other aggregation functions with it in your Group recipe. Please give this a try and let me know if you still end up facing issues!
Best,
Andrew
-
Hi Andrew,
thanks for your answer. Effectively I missed step to modify the order_data column 's type in a previous course.
Titouan.