原创

SQL Server商业智能中ODS表和Dim表必须有的字段

  ODS表里面必须有的字段
  [CreationTime] [datetime] NULL,--业务发生时间
  Createtime datetime default(getdate()), --数据仓库插入时间
  [DateID] AS ((datepart(year,[CreationTime])*(10000) + datepart(month,[CreationTime]) * (100)) + datepart(day,[CreationTime])),
  [HourID] AS (datepart(hour,[CreationTime])),
  [MiniteID] AS (datepart(minute,[CreationTime])),
  [IsValid] AS ((1))

  Dim表必须有的字段
  CreationTime datetime,
  DimStartTime datetime,
  DimEndTime datetime,
  IsCurrent int default(1),
  CreateTime datetime default(getDate())

正文到此结束
本文目录