Data Warehouse in Databricks Date values as date or int: what is recommended?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 02:29 AM
In relational data warehouse systems it was best practise to represent date values as YYYYMMDD integer type values in tables. Date comparison could be done easily without using date-functions and with low performance impact.
Is this still the recommended way in a delta lakehouse architecture?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 05:38 AM - edited 04-23-2024 05:39 AM
Hi @DataFarmer
I Databricks I will advise you to use date type instead of int, this will make your life much simpler while working on the date type data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 12:49 AM
Definitely +1.
You don't want to lose leading zeroes f.e.