What is it?
Data time is a type of data source that is meant for creating a dynamic table of dates that could connect a number of fact tables and create a shared time dimension in your data model.
How to create a date time table?
Full Dynamic table
To use a fully dynamic date time table, you should tick the Use Dynamic Start Date and then setup how far back the dates should be created (in this case 3 years).
With this setup - it would be natural to set the scheduler to once a day (meaning a new day is dynamically added to the date table every day):
Dynamic table with fixed offset (or completely fixed table)
You could also setup a fixed start date (by unticking Dynamic Start Date and picking a fixed date like here:
If you untick Use todays date for every update, you also get the option to set a fixed end date using the calendar:
Working with intervals and time (hours, minutes seconds)
You can create a record in the Date time table per hour, minute or second if needed.
This setup will create a row for each hour of each date (as you can see the scheduler has been set accordingly to update the table each hour):
This would be the resulting table - just showing a few hours of one day:
Using accurate time
In case you want to create just one row per date - but with a fixed timestamp, you could use the below setup as an example:
Notice again that the scheduler has been set to 1pm - so it will update shortly after 12.
This would be the resulting table - just showing a few hours of one day:
Tip: It might be a good idea to create a format on top of your date time table with a lot of derived columns from the date time column to get access to to individual attributes such a month, year, hour, minute, second.
Comments
Please sign in to leave a comment.