简体   繁体   English

Informatica编码

[英]Informatica coding

I am currently working on a scenario in Informatica Powercenter designer where the situation is as follows: 我目前正在Informatica Powercenter Designer中研究一种情况,情况如下:

SQ1: I am pulling employee records according to the criteria of having a layer of employees based on their hierarchy (Client relation directors) which is the first source qualifier and in which i am doing a sql override to extract data from 3 tables, and for those selected employees I have to pull some other information for example: SQ1:我根据员工的层次结构(客户关系主管)的标准来拉动员工记录,这是第一个源限定符,并且我正在执行sql重写以从3个表中提取数据,并且那些选定的员工,我还必须提供一些其他信息,例如:

SQ2: what client relations they are handling which is in a separate source qualifier and SQ2:他们正在处理哪些客户关系,这些关系在单独的源限定符中

SQ3 some of the personal information from their profile which is in a third source qualifier. SQ3来自其个人资料的一些个人信息,位于第三来源限定符中。

I have single mapping in which there are three source qualifiers as described above and in all of them I am using SQL override. 我有一个映射,其中有三个如上所述的源限定符,并且在所有映射中我都使用SQL覆盖。 My question is that the data that i have pulled in first qualifier brings a subset of the total employee records, but in Source qualifier 2 and source qualifier 3 I have to pull all employee data and then do a join on employee_id in two joiners to finally collect data for the layer of employees that are coming from source qualifier 1. What i want is that if somehow I save the employee ids from and SQ1 and use them in SQ2 and SQ3 so that i pull data for only a subset of employees, the problem is I cant split the mapping and cannot add the code for selecting the subset from SQ1 bc it will be repitition of code and taking a long time to run, also the number of records are about one million. 我的问题是,我在第一个限定符中提取的数据带来了全部员工记录的一部分,但是在源限定符2和源限定符3中,我必须提取所有员工数据,然后在两个连接器中对employee_id进行连接,最后收集来自源限定符1的员工层的数据。我想要的是,如果我以某种方式保存了来自SQ1和SQ1的员工ID,并在SQ2和SQ3中使用它们,以便我仅提取一部分员工的数据,问题是我无法拆分映射,并且无法添加用于从SQ1 bc中选择子集的代码,这将重新分配代码并需要很长时间才能运行,而且记录数约为一百万。 I cant find a way to perform the above that is why i am asking for help here. 我找不到执行上述操作的方法,这就是为什么我在这里寻求帮助。

I am pulling data from db2, and working in powercenter designer 9.5.1. 我正在从db2中提取数据,并在Powercenter Designer 9.5.1中工作。 I will be thankful if i can get guidance regarding the above issue 如果能就上述问题获得指导,我将不胜感激

What you can do is if all the table is in database,you can pull the source tables in one source qualifier and then override the SQL and create a join. 您可以做的是,如果所有表都在数据库中,则可以在一个源限定符中提取源表,然后覆盖SQL并创建联接。 So the point is instead of 3 different source qualifier you can have one source qualifier. 因此,重点是您可以拥有一个源限定符,而不是3个不同的源限定符。

I assume you are having three separate source qualifiers because the data is present in different databases. 我假设您具有三个单独的源限定符,因为数据存在于不同的数据库中。 If not, doing an application join from three different source qualifiers( you will have to use 2 joiners) is very expensive. 如果没有,那么从三个不同的源限定符(您将必须使用2个连接器)进行应用程序连接非常昂贵。 There are a couple of ways you can do this: 有两种方法可以执行此操作:

  1. split the mapping to stage the data first and then use this staging layer as source to perform more complex operation 拆分映射以首先暂存数据,然后使用此暂存层作为源来执行更复杂的操作

  2. Identify your driving table. 确定您的驾驶台。 Since the record count in the SQ2 and SQ3 are bigger, I am assuming they can be the driving table. 由于SQ2和SQ3中的记录数较大,因此我假设它们可以成为驱动表。 Use a lookup for SQ1 (Since its a smaller table size, the cache time would not be very big) 对SQ1使用查找(由于它的表较小,因此缓存时间不会很大)

I would still suggest you use a staging layer to extract and stage the data, then transform it. 我仍然建议您使用暂存层来提取和暂存数据,然后对其进行转换。 Try to perform database joins(or lookups) as much as you can instead of joining at the application layer. 尽量执行数据库联接(或查找),而不要在应用程序层进行联接。

Consider using a pipeline lookup as a query for your SQ1 and use it in the pipeline that joins SQ2 and SQ3 . 考虑使用管道查找作为对SQ1的查询,并在连接SQ2和SQ3的管道中使用它。

Usage for pipeline lookup can be found at : 可以在以下位置找到管道查找的用法:

https://marketplace.informatica.com/solutions/performance_tuning_pipeline_lookup https://marketplace.informatica.com/solutions/performance_tuning_pipeline_lookup

Let me know if it helps . 让我知道是否有帮助。

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

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