informatica 中的 SCD TYPE2

发布于 2024-12-13 02:09:35 字数 80 浏览 3 评论 0原文

你们中的任何人都可以详细说明如何将 Informatica 的插入和更新从源表映射到目标吗?

如果您用示例进行解释,我将不胜感激。

Can anyone of you please elaborate on how to map the informatica for the inserts and updates to the target from source table?

I appreciate it, if you explain with example.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

作妖 2024-12-20 02:09:35

仅 TYPE2 插入(新行以及更新的行)

版本数据映射:

2 类维度/版本数据映射根据用户定义的比较筛选源行,并将新的和更改的维度插入到目标中。通过对主键进行版本控制并为表中的每个维度创建版本号来跟踪目标表中的更改。在类型 2 维度/版本数据目标中,维度的当前版本具有该维度的最高版本号和最高增量主键。

当您想要在表中保留维度数据的完整历史记录时,可以使用类型 2 维度/版本数据映射来更新缓慢变化的维度表。版本号和版本化主键跟踪每个维度的更改顺序。

当您使用此选项时,Designer 会在目标中创建两个附加字段:

PM_PRIMARYKEY。集成服务为写入目标的每一行生成一个主键。
PM_VERSION_NUMBER。集成服务为写入目标的每一行生成一个版本号。

创建类型 2 维度/有效日期范围映射

类型 2 维度/有效日期范围映射根据用户定义的比较筛选源行,并将新的和更改的维度插入到目标中。通过维护目标中每个维度的每个版本的有效日期范围来跟踪目标表中的更改。在类型 2 维度/有效日期范围目标中,维度的当前版本具有开始日期,但没有相应的结束日期。

当您想要在表中保留维度数据的完整历史记录时,请使用类型 2 维度/有效日期范围映射来更新缓慢变化的维度表。有效日期范围跟踪每个维度的变化的时间历史。

当您使用此选项时,Designer 在目标中创建以下附加字段:

PM_BEGIN_DATE。对于写入目标的每个新的和更改的维度,集成服务使用系统日期来指示维度的有效日期范围的开始时间。
PM_END_DATE。对于要更新的​​每个维度,集成服务使用系统日期来指示维度的有效日期范围的结束时间。

PM_PRIMARYKEY。集成服务为写入目标的每一行生成一个主键。

类型 2 维度/标志当前映射

类型 2 维度/标志当前映射根据用户定义的比较筛选源行,并将新的和更改的维度插入到目标中。通过标记每个维度的当前版本并对主键进行版本控制,可以跟踪目标表中的更改。在类型 2 维度/标志当前目标中,维度的当前版本的当前标志设置为 1,并且具有最高递增的主键。

当您想要在表中保留维度数据的完整历史记录并标记最新数据时,请使用类型 2 维度/标记当前映射来更新缓慢变化的维度表。版本化主键跟踪每个维度的更改顺序。

当您使用此选项时,Designer 会在目标中创建两个附加字段:

PM_CURRENT_FLAG。集成服务将当前行标记为“1”,将所有先前版本标记为“0”。
PM_PRIMARYKEY。集成服务为写入目标的每一行生成一个主键。

TYPE2 Only INSERTS(New Rows as well as Updated Rows)

Version Data Mapping:

The Type 2 Dimension/Version Data mapping filters source rows based on user-defined comparisons and inserts both new and changed dimensions into the target. Changes are tracked in the target table by versioning the primary key and creating a version number for each dimension in the table. In the Type 2 Dimension/Version Data target, the current version of a dimension has the highest version number and the highest incremented primary key of the dimension.

Use the Type 2 Dimension/Version Data mapping to update a slowly changing dimension table when you want to keep a full history of dimension data in the table. Version numbers and versioned primary keys track the order of changes to each dimension.

When you use this option, the Designer creates two additional fields in the target:

PM_PRIMARYKEY. The Integration Service generates a primary key for each row written to the target.
PM_VERSION_NUMBER. The Integration Service generates a version number for each row written to the target.

Creating a Type 2 Dimension/Effective Date Range Mapping

The Type 2 Dimension/Effective Date Range mapping filters source rows based on user-defined comparisons and inserts both new and changed dimensions into the target. Changes are tracked in the target table by maintaining an effective date range for each version of each dimension in the target. In the Type 2 Dimension/Effective Date Range target, the current version of a dimension has a begin date with no corresponding end date.

Use the Type 2 Dimension/Effective Date Range mapping to update a slowly changing dimension table when you want to keep a full history of dimension data in the table. An effective date range tracks the chronological history of changes for each dimension.

When you use this option, the Designer creates the following additional fields in the target:

PM_BEGIN_DATE. For each new and changed dimension written to the target, the Integration Service uses the system date to indicate the start of the effective date range for the dimension.
PM_END_DATE. For each dimension being updated, the Integration Service uses the system date to indicate the end of the effective date range for the dimension.

PM_PRIMARYKEY. The Integration Service generates a primary key for each row written to the target.

The Type 2 Dimension/Flag Current mapping

The Type 2 Dimension/Flag Current mapping filters source rows based on user-defined comparisons and inserts both new and changed dimensions into the target. Changes are tracked in the target table by flagging the current version of each dimension and versioning the primary key. In the Type 2 Dimension/Flag Current target, the current version of a dimension has a current flag set to 1 and the highest incremented primary key.

Use the Type 2 Dimension/Flag Current mapping to update a slowly changing dimension table when you want to keep a full history of dimension data in the table, with the most current data flagged. Versioned primary keys track the order of changes to each dimension.

When you use this option, the Designer creates two additional fields in the target:

PM_CURRENT_FLAG. The Integration Service flags the current row “1” and all previous versions “0.”
PM_PRIMARYKEY. The Integration Service generates a primary key for each row written to the target.

染年凉城似染瑾 2024-12-20 02:09:35

您可以首先在此处查看 SCD type-2 的定义。
http://en.wikipedia.org/wiki/Slowly_chang_dimension#Type_2

这个实现是这样的Informatica 实际上为您提供了执行此操作的模板,这在数据仓库中很常见。您只需“插入”表名称和属性即可。

如果安装了informatica,可以到帮助指南中的以下位置查看详细的实现逻辑。

内容>>设计师指南>使用映射向导>创建 2 类维度。

You can start by looking at the Definition of SCD type-2 here.
http://en.wikipedia.org/wiki/Slowly_changing_dimension#Type_2

This implementation is so common in data warehouses that Informatica actually provides you with the template to do so. You can just "plug-in" your table names and the attributes.

If you have informatica installed, you can go to the following location in the help guide to see the detailed implementation logic.

Contents > Designer Guide > Using the mapping wizards > Creating a type 2 dimension.

梦幻之岛 2024-12-20 02:09:35

使用路由器定义 UPDATE 和 INSERT 组。将每组的输出传递给更新策略,然后传递给目标。 HTH。

Use a router to define groups for UPDATE and INSERT. Pass the output of each group to update strategy and then to target. HTH.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文