|

Defining a Dimension with Smart Keys

While conventional wisdom (and Kimball) says that using meaningful identifiers for surrogate keys is a bad idea, there are some exceptions where it makes sense. Typical examples include: Calendar. An example of a Calendar smart key is – year, month, day e.g. 20110721. A DateTime value can be converted to this date format using this statement convert(char(8),date, 112)….