Informatica常用组件使用方法

本文详细介绍了Informatica中几个关键组件的使用方法,包括Lookup Transformation的Connected与unconnected、Relational或flat file lookup的差异,以及Cached与uncached的选择。Aggregator Transformation的功能和优化技巧,如何进行分组和使用汇总表达式。另外还涵盖了Filter、Joiner、Router、Sorter、Source Qualifier和Union Transformation的特性与应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

表1中列出的是informatica中的所有组件。不会在本文档中出现的会在组件名后标出。

表1

Aggregator

Active/

Connected

Performs aggregate calculations.

Application Source Qualifier

Active/

Connected

Represents the rows that the Integration Service reads from an application, such as an ERP source, when it runs a session.

Custom

Active or Passive/

Connected

Calls a procedure in a shared library or DLL.

Expression

Passive/

Connected

Calculates a value.

External Procedure

Passive/

Connected or Unconnected

Calls a procedure in a shared library or in the COM layer of Windows.

Filter

Active/

Connected

Filters data.

HTTP Transformation

Passive/Connected

Connects to an HTTP server to read or update data.

Input

Passive/

Connected

Defines mapplet input rows. Available in the Mapplet Designer.

Java

Active or Passive/

Connected

Executes user logic coded in Java. The byte code for the user logic is stored in the repository.

Joiner

Active/

Connected

Joins data from different databases or flat file systems.

Lookup

Passive/

Connected or Unconnected

Looks up values.

Normalizer

Active/

Connected

Source qualifier for COBOL sources. Can also use in the pipeline to normalize data from relational or flat file sources.

Output

Passive/

Connected

Defines mapplet output rows. Available in the Mapplet Designer.

Rank

Active/

Connected

Limits records to a top or bottom range.

Router

Active/

Connected

Routes data into multiple transformations based on group conditions.

Sequence Generator

Passive/

Connected

Generates primary keys.

Sorter

Active/Connected

Sorts data based on a sort key.

Source Qualifier

Active/

Connected

Represents the rows that the Integration Service reads from a relational or flat file source when it runs a session.

SQL

Active or Passive/Connected

Executes SQL queries against a database.

Stored Procedure

Passive/

Connected or Unconnected

Calls a stored procedure.

Transaction Control

Active/

Connected

Defines commit and rollback transactions.

Union

Active/Connected

Merges data from different databases or flat file systems.

Update Strategy

Active/

Connected

Determines whether to insert, delete, update, or reject rows.

XML Generator

Active/

Connected

Reads data from one or more input ports and outputs XML through a single output port.

XML Parser

Active/

Connected

Reads XML from one input port and outputs data to one or more output ports.

XML Source Qualifier

Active/

Connected

Represents the rows that the Integration Service reads from an XML source when it runs a session.


Lookup
1.1 概要描述

获得一个关联的值。例如:源里包含employee ID,但你还需要employee name。

用于计算的植。例如:只是汇率或者个人所得税之类的固定数值,不是计算得出来的数据。

Update slowly changing dimension tables。主要是根据条件查出原表,若查出了,就把自己添加的标志位设为真,否则就设置为假。

1.2 Connected or unconnected

Connected 和 unconnected 的transformations的输入和输出是不同的,不同点如表2列出的。

表2

Connected Lookup

Unconnected Lookup

从 pipeline获得输入。

从另一个transformation的:LKP的表达式获得输入。

使用静态或者动态cache。

使用静态cache。

Cache中包括所有的 mapping中使用到的lookup columns(就是condition中的和被标记为输出的columns)。

Cache中包括所有condition中的、被标记为输出的columns以及被标记为return port的。

同行能够返回多个columns 或者加载到动态lookup cache中。

每行只能返回一个return port (R)。

如果没有匹配的数据,Integration Service会返回一个默认值。如果是动态缓存(cache),会加入一个新的行或者放着他不管。

如果没有匹配的数据,Integration Service会返回一个NULL。

如果有匹配的数据,Integration Service回返回一个结果包括所有被设置为输出的值。如果是动态缓存,Integration Service会任意的修改一行或者放着它不管。

如果有匹配的数据,Integration Service会返回一个被设置为return port的值。

输出所有的被标记为output的符合条件的数据。

返回一个值到使用:LKP调用它的表达式。

用户可以设置默认值。

用户不可以设置默认值。

Connected

下面是Integration Service处理connected Lookup transformation的过程:

1. 一个connected Lookup transformation通过pipeline从其他的transformation获得输入值。

2. 为每个输入行,Integration Service会通过lookup ports 和 condition从源或者缓存中查询。

3. 如果组件没有使用缓存或者使用的静态缓存,Integration Service会使用lookup query来返回值。

4. 如果组件使用的动态缓存,当Integration Service在缓存找不到这行,它会把这行插入到缓存中。当Integration Service找到这行,它会修改这行在缓存中或者什么都不做。它标记这行是插入、修改或者是不做变动。

5. Integration Service从查询中返回值到下一个transformation。

如果transformation使用动态缓存,你可以把这行通过Filter 或者 Router transformation来过滤后在到目标中。

unconnected

l 你可以在一个mapping中调用这个Lookup transformation多次。

l 下面的步骤描述了Integration Service处理一个unconnected Lookup transformation的过程:

1. 一个unconnected Lookup transformation从另一个transformation的一个:LKP表达式的结果中获得输入值,例如一个Update Strategy transformation。

2. Integration Service通过transformation 中的lookup ports 和 condition来查询。

3. Integration Service返回一个值到Lookup transformation 的return port 中。

4. Integration Service把值返回到:LKP表达式中。

l 步骤

1. 添加input ports。

2. 添加查询条件。

3. 指定返回值。

4. 从其他的组件中调用该lookup。

l 用途

unconnected lookups多数用于:

1. 在一个表达式测试一个lookup的值。

2. 在查询的基础上过滤。

3. 标记行基于查询的结果,例如:updating slowly changing dimension tables。

4. 调用同一个查找多次在一个mapping中。

1.3 Relational or flat file lookup

当你在建立一个Lookup transformation时,你可以选择查询flat file或者relational table。

Relational

你可以通过SQL的来override默认的SQL,这样可以你可以加where或者查询多个表。

flat file

使用下面选项在使用flat file时:

1. 指定源是indirect files的。

2. 使用sorted输入。

Tips

l 使用这些技巧在你配置一个Lookup transformation的时候:

l 给被用于查询条件的列加一个索引。

l 把=号放在条件的第一位。

l 查询的时候,完全加载小的表。

l 在数据库中Join tables比使用查询要高校的多。

l 为静态cache设置固定的大小。

l 使用:LKP来调用unconnected Lookup transformations。

1.4 Cached or uncached

有时,你可以在使用lookup组件查询表的时候,把组件设置成Cached 的来提高session的速度。如果你选择了Cached ,你可以选择使用动态的还是静态的。默认的是使用静态的。

Cached

我们可以在一个lookup组件中为要查询的表配置cache。当第一行数据进入lookup组件的时候,Integration Service会在内存为它建立一个cache。它分配内存基于你在组件或者session的属性中配置的数量。Integration Service把条件值保存索引cache,把output值保存在数据cache。Integration Service会为每一条进入这个组件的行查询cache。

Integration Service也同样会建立cache files用$PMCacheDir(相对路径,在consol中可以配置)中默认的。如果数据不适合内存cache时,Integration Service把超出的数据保存到cache files中。当seesion结束,Integration Service会释放cache记忆和删除cache files,除非你配置组件使用持久化的cache。

如果你使用flat file lookup,Integration Service总是会把它放在cache中。如果你配置flat file lookup为sorted input,Integration Service不会把它放入cache,如果条件类不是分组的。如果这些列是分组的,但是没有sorted,Integration Service会处理这个查询的方式和没有配置sorted input一样。

当你配置了lookup cache,你可以配置如下cache选项:

Building caches:你可以配置session建立多个cache用串行或者并行。当你建立串行的cache时,Integration Service会按照源行进入的顺序建立cache。当你建立并行的cache时,Integration Service不会等第一行进入Lookup transformation,就会建立cache。代替的是建立多个并行的cache。

Persistent cache:你可以保存lookup cache files并重用他们在Integration Service调用一个配置使用该cache的Lookup transformation。

Integration Service 对Persistent Caches的处理:

Mapping or Session Changes Between Sessions

Named Cache

Unnamed Cache

Integration Service cannot locate cache files.

Rebuilds cache.

Rebuilds cache.

Enable or disable the Enable High Precision option in session properties.

Fails session.

Rebuilds cache.

Edit the transformation in the Mapping Designer, Mapplet Designer, or Reusable Transformation Developer.*

Fails session.

Rebuilds cache.

Edit the mapping (excluding Lookup transformation).

Reuses cache.

Rebuilds cache.

Change database connection or the file location used to access the lookup table.

Fails session.

Rebuilds cache.

Change the Integration Service data movement mode.

Fails session.

Rebuilds cache.

Change the sort order in Unicode mode.

Fails session.

Rebuilds cache.

Change the Integration Service code page to a compatible code page.

Reuses cache.

Reuses cache.

Change the Integration Service code page to an incompatible code page.

Fails session.

Rebuilds cache.

*Editing properties such as transformation description or port description does not affect persistent cache handling.

Recache from source:当持久化的cache不是同步的时候,你可以配置Lookup transformation重新建立新的cache。

Static cache:你可以为所有的lookup source配置一个静态,或者只读的cache。默认的,Integration Service建立静态的cache。它为所有进入组件的lookup file或者 table 以及 looks up values建立cache。当条件为真的时候,Integration Service从cache中返回一个值。

Dynamic cache:为一个target table或者flat file source建立cache,并且向cache中插入新的行或者修改现有的行,当使用动态cache。在cache中,Integration Service动态的插入或者修改数据并且把数据传到目标中。

Shared cache:你可以共享cache在多个组件之间。你可以共享一个匿名的cache在一张mapping中。你可以共享一个有名的cache在同一个或者不同的mapping中。

当你没有为Lookup transformation配置cache,Integration Service为每一个输入行查询查询表。结果和处理过程是同样的,不论你是否设置cache。然而,使用cache可以改善session的性能。当被查询的表很大的时候可以使用cache最大的优化性能。

Cache Comparison

uncached lookup, static cache, dynamic cache的区别:

Uncached

Static Cache

Dynamic Cache

你不可以向cache中插入或者修改。

你不可以向cache中插入或者修改。

你可以向cache中插入或者修改,并且可以向目标传输。

不可以进行flat file的查询。

可以进行relational 或者 flat file的查询。

Informatica Enterprise Data Integration包括Informatica PowerCenter和Informatica PowerExchange 两大产品,凭借其高性能、可充分扩展的平台,可以解决几乎所有数据集成项目和企业集成方案。 · Informatica PowerCenter用于访问和集成几乎任何业务系统、任何格式的数据,它可以按任意速度在企业内交付数据,具有高性能、高可扩展性、高可用性的特点。Informatica PowerCenter包括4个不同版本,即:标准版,实时版,高级版,云计算版。同时,它还提供了多个可选的组件,以扩展Informatica PowerCenter的核心数据集成功能,这些组件包括:数据清洗和匹配、数据屏蔽、数据验证、Teradata双负载、企业网格、元数据交换、下推优化(Pushdown Optimization)、团队开发和非结构化数据等。 · Informatica PowerExchange 是一系列的数据访问产品,它确保 IT 机构能够根据需要随时随地访问并在整个企业内传递关键数据。凭该能力,IT机构可以优化有限的资源和数据的业务价值。Informatica PowerExchange支持多种不同的数据源和各类应用,包括企业应用程序、数据库和数据仓库、大型机、中型系统、消息传递系统和技术标准。 Informatica Data Quality通过一个全面、统一的平台,为所有项目和应用程序的相关人士、项目和数据域(无论在内部预置,还是在云中),提供普遍深入的数据质量控制。 · Informatica Data Quality结合了强大的数据分析、清洗、匹配、报告、监控能力和易于使用的界面,使业务信息所有者能够在整个企业范围内实施和管理数据质量计划。 · Informatica Data Quality Cloud Edition (云计算版)将普遍数据质量的功效和功能与最新云计算平台的灵活性、易用性和经济性相结合,向所有相关人士、项目和数据域交付数据质量。 · Informatica Identity Resolution是一款功能强大且高度可扩展的身份识别解决方案,让企业和政府机构能够批量且实时地搜索和匹配来自超过60种语言的身份数据。 · informatica Data Explorer通过强大的数据探查、数据映射能力和前所未有的易用性的完美组合,让您轻松发现、监控数据质量问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值