美文网首页
early arriving dimension

early arriving dimension

作者: 鲸鱼酱375 | 来源:发表于2019-11-21 09:40 被阅读0次

    https://www.leapfrogbi.com/archives/13291

    https://www.mssqltips.com/sqlservertip/1446/handle-early-arriving-facts-in-sql-server-integration-services-ssis/

    so it likely we have transaction record in our fact table, but we do not have dimension record.
    method 1: create surrograte key, which can display "unknown" value, unless we have the dimension record

    If the fact record does have value without a reference to a related late arriving dimension, and we either do not expect or do not care if a dimension record shows up at a later time, then we can simply load the fact record with a foreign key reference to the unknown record in the related dimension; typically -1 surrogate key value. Note that we must pay particular attention to the fact grain if we are going to take the unknown member approach to failed foreign key lookups. Most fact table primary keys are set as a composite across foreign keys and degenerate dimensions. If allowing a foreign key to be set to -1 causes a possible primary key violation, then we need to look for other options such as adding a degenerate dimension.

    method 2: create the inferred method, we can use the natural key in the record bound for the fact table to seed a record (inferred member) in the related dimensions. Once the dimension record shows up, it will have the same natural key and the dimension record’s attributes can then be updated. Particular attention should be paid to the inferred member’s record time in cases where dimension history is tracked such as SCD 2 situations.


    好文

    http://www.disoln.org/2013/12/Design-Approach-to-Handle-Late-Arriving-Dimensions-and-Late-Arriving-Facts.html

    相关文章

      网友评论

          本文标题:early arriving dimension

          本文链接:https://www.haomeiwen.com/subject/gkenictx.html