Date time as a data source - basic guide

mceclip0.png

 

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).

mceclip1.png

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):
mceclip2.png

 

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:
mceclip3.png

If you untick Use todays date for every update, you also get the option to set a fixed end date using the calendar:
mceclip4.png

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):

mceclip5.png

This would be the resulting table - just showing a few hours of one day:
mceclip6.png

 

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:
mceclip7.png

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:

mceclip8.png

 

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. 

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.