简体   繁体   English

发票header及发票行事实表抽取题

[英]Invoice header and invoice line fact table extraction question

I have a question regarding the best practice regarding the loading of invoice header and line data inside InvoiceLineFact table.我有一个关于在 InvoiceLineFact 表中加载发票 header 和行数据的最佳实践的问题。 I am following the Kimball recommendation where I bring all the dimensionality of the header down to the line items like shown on the picture:我遵循 Kimball 的建议,我将 header 的所有维度都归结为如图所示的行项目:

HeaderLineFact 表示例

For data extraction part we use store procedures created on our DWH SQL Server which are automatically executed via job in sequential order.对于数据提取部分,我们使用在我们的 DWH SQL 服务器上创建的存储过程,这些过程通过作业按顺序自动执行。 What we do in every procedure is that we target the transaction tables on remote/linked server (DynamicsNAV db sql server):我们在每个过程中所做的是我们将远程/链接服务器(DynamicsNAV db sql 服务器)上的事务表作为目标:

Example:例子:

SELECT *
FROM LinkedServer.NAVDB.dbo.InvoiceHeader
INNER JOIN LinkedServer.NAVDB.dbo.InvoiceLine

The problem is that the our ETL is started to slow down from day to day.问题是我们的 ETL 开始一天比一天慢下来。

I wanted to ask if this is the efficient thing to do or there is a better way of doing this, like extracting the raw data in separate table and then join it on the DWH server, or maybe placing it inside SSIS package as it is.我想问问这样做是否有效,或者有更好的方法,比如在单独的表中提取原始数据,然后将其加入 DWH 服务器,或者将其原样放在 SSIS package 中。

if this is the efficient thing to do如果这是有效的做法

No. Joining distributed tables and sending complex queries to operational systems are both problematic.不会。连接分布式表和向操作系统发送复杂查询都是有问题的。

or there is a better way of doing this,或者有更好的方法,

Yes是的

like extracting the raw data in separate table and then join it on the DWH server比如在单独的表中提取原始数据,然后将其加入 DWH 服务器

Yes.是的。 This is standard best-practice for building data warehouses.这是构建数据仓库的标准最佳实践。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM