Datetime fields within a fact table
2 posters
Page 1 of 1
Datetime fields within a fact table
can we have a datetime column in a fact table?in which scenario's is this correct to have a datetime in a fact table.
In my Facttable i stored date as int.They are just the milestone dates reported against each activity.I show those dates in reports.
So i dont see a purpose in storing them as int and joining with DIM tables to get the dates.So wanted to make sure if i can have them stored as datetime.
In my Facttable i stored date as int.They are just the milestone dates reported against each activity.I show those dates in reports.
So i dont see a purpose in storing them as int and joining with DIM tables to get the dates.So wanted to make sure if i can have them stored as datetime.
SathyJaanu- Posts : 20
Join date : 2015-10-07
Re: Datetime fields within a fact table
Is there any particular rule as in a date field to be used as int? or to use as Datetime?
SathyJaanu- Posts : 20
Join date : 2015-10-07
Re: Datetime fields within a fact table
If you mean by 'as int' as a foreign key to the date dimension, it is when you need the attributes in the date dimension.
Re: Datetime fields within a fact table
Got it
But my question is why would someone use a datetime or int in fact .If there is any filtering condition to be done in reports we go for int and
when we just have to show in a report we go as datetime?
But my question is why would someone use a datetime or int in fact .If there is any filtering condition to be done in reports we go for int and
when we just have to show in a report we go as datetime?
SathyJaanu- Posts : 20
Join date : 2015-10-07
Re: Datetime fields within a fact table
Why would you convert a DATE column to an INTEGER column to support filtering? Filtering a DATE data type works, and you have more functionality to compare and manipulate values.
However, the point of having a date dimension is to provide this functionality without end-users needing to know date functions, such as knowing the date is a Tuesday or belongs in a particular fiscal period. But, for uses such as effective/expiration timestamps, simply storing the value in the fact is usually good enough.
However, the point of having a date dimension is to provide this functionality without end-users needing to know date functions, such as knowing the date is a Tuesday or belongs in a particular fiscal period. But, for uses such as effective/expiration timestamps, simply storing the value in the fact is usually good enough.
Similar topics
» Datetime or DateID and TimeID in transactional fact table
» Descriptive Fields in Fact Table
» character data in a fact table?
» Popluate two measure fields in fact table from same SCD2 dimenion attribute
» 'Routing' the grain of the fact table to multpile members of multiple dimensions causes the fact table to 'explode'
» Descriptive Fields in Fact Table
» character data in a fact table?
» Popluate two measure fields in fact table from same SCD2 dimenion attribute
» 'Routing' the grain of the fact table to multpile members of multiple dimensions causes the fact table to 'explode'
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum