Informatica 常用组件使用方法Word文件下载.docx
- 文档编号:16924317
- 上传时间:2022-11-27
- 格式:DOCX
- 页数:42
- 大小:833.75KB
Informatica 常用组件使用方法Word文件下载.docx
《Informatica 常用组件使用方法Word文件下载.docx》由会员分享,可在线阅读,更多相关《Informatica 常用组件使用方法Word文件下载.docx(42页珍藏版)》请在冰豆网上搜索。
Definesmappletinputrows.AvailableintheMappletDesigner.
Java
ExecutesuserlogiccodedinJava.Thebytecodefortheuserlogicisstoredintherepository.
Joiner
Joinsdatafromdifferentdatabasesorflatfilesystems.
Lookup
Looksupvalues.
Normalizer
SourcequalifierforCOBOLsources.Canalsouseinthepipelinetonormalizedatafromrelationalorflatfilesources.
Output
Definesmappletoutputrows.AvailableintheMappletDesigner.
Rank
Limitsrecordstoatoporbottomrange.
Router
Routesdataintomultipletransformationsbasedongroupconditions.
SequenceGenerator
Generatesprimarykeys.
Sorter
Active/Connected
Sortsdatabasedonasortkey.
SourceQualifier
RepresentstherowsthattheIntegrationServicereadsfromarelationalorflatfilesourcewhenitrunsasession.
SQL
ActiveorPassive/Connected
ExecutesSQLqueriesagainstadatabase.
StoredProcedure
Callsastoredprocedure.
TransactionControl
Definescommitandrollbacktransactions.
Union
Mergesdatafromdifferentdatabasesorflatfilesystems.
UpdateStrategy
Determineswhethertoinsert,delete,update,orrejectrows.
XMLGenerator
ReadsdatafromoneormoreinputportsandoutputsXMLthroughasingleoutputport.
XMLParser
ReadsXMLfromoneinputportandoutputsdatatooneormoreoutputports.
XMLSourceQualifier
RepresentstherowsthattheIntegrationServicereadsfromanXMLsourcewhenitrunsasession.
概要描述
获得一个关联的值。
例如:
源里包含employeeID,但你还需要employeename。
用于计算的植。
只是汇率或者个人所得税之类的固定数值,不是计算得出来的数据。
Updateslowlychangingdimensiontables。
主要是根据条件查出原表,若查出了,就把自己添加的标志位设为真,否则就设置为假。
Connectedorunconnected
Connected和unconnected的transformations的输入和输出是不同的,不同点如表2列出的。
表2
ConnectedLookup
UnconnectedLookup
从pipeline获得输入。
从另一个transformation的:
LKP的表达式获得输入。
使用静态或者动态cache。
使用静态cache。
Cache中包括所有的mapping中使用到的lookupcolumns(就是condition中的和被标记为输出的columns)。
Cache中包括所有condition中的、被标记为输出的columns以及被标记为returnport的。
同行能够返回多个columns或者加载到动态lookupcache中。
每行只能返回一个returnport(R)。
如果没有匹配的数据,IntegrationService会返回一个默认值。
如果是动态缓存(cache),会加入一个新的行或者放着他不管。
如果没有匹配的数据,IntegrationService会返回一个NULL。
如果有匹配的数据,IntegrationService回返回一个结果包括所有被设置为输出的值。
如果是动态缓存,IntegrationService会任意的修改一行或者放着它不管。
如果有匹配的数据,IntegrationService会返回一个被设置为returnport的值。
输出所有的被标记为output的符合条件的数据。
返回一个值到使用:
LKP调用它的表达式。
用户可以设置默认值。
用户不可以设置默认值。
Connected
下面是IntegrationService处理connectedLookuptransformation的过程:
1.一个connectedLookuptransformation通过pipeline从其他的transformation获得输入值。
2.为每个输入行,IntegrationService会通过lookupports和condition从源或者缓存中查询。
3.如果组件没有使用缓存或者使用的静态缓存,IntegrationService会使用lookupquery来返回值。
4.如果组件使用的动态缓存,当IntegrationService在缓存找不到这行,它会把这行插入到缓存中。
当IntegrationService找到这行,它会修改这行在缓存中或者什么都不做。
它标记这行是插入、修改或者是不做变动。
5.IntegrationService从查询中返回值到下一个transformation。
如果transformation使用动态缓存,你可以把这行通过Filter或者Routertransformation来过滤后在到目标中。
unconnected
●你可以在一个mapping中调用这个Lookuptransformation多次。
●下面的步骤描述了IntegrationService处理一个unconnectedLookuptransformation的过程:
1.一个unconnectedLookuptransformation从另一个transformation的一个:
LKP表达式的结果中获得输入值,例如一个UpdateStrategytransformation。
2.IntegrationService通过transformation中的lookupports和condition来查询。
3.IntegrationService返回一个值到Lookuptransformation的returnport中。
4.IntegrationService把值返回到:
LKP表达式中。
●步骤
1.添加inputports。
2.添加查询条件。
3.指定返回值。
4.从其他的组件中调用该lookup。
●用途
unconnectedlookups多数用于:
1.在一个表达式测试一个lookup的值。
2.在查询的基础上过滤。
3.标记行基于查询的结果,例如:
updatingslowlychangingdimensiontables。
4.调用同一个查找多次在一个mapping中。
Relationalorflatfilelookup
当你在建立一个Lookuptransformation时,你可以选择查询flatfile或者relationaltable。
Relational
你可以通过SQL的来override默认的SQL,这样可以你可以加where或者查询多个表。
flatfile
使用下面选项在使用flatfile时:
1.指定源是indirectfiles的。
2.使用sorted输入。
Tips
●使用这些技巧在你配置一个Lookuptransformation的时候:
●给被用于查询条件的列加一个索引。
●把=号放在条件的第一位。
●查询的时候,完全加载小的表。
●在数据库中Jointables比使用查询要高校的多。
●为静态cache设置固定的大小。
●使用:
LKP来调用unconnectedLookuptransformations。
Cachedoruncached
有时,你可以在使用lookup组件查询表的时候,把组件设置成Cached的来提高session的速度。
如果你选择了Cached,你可以选择使用动态的还是静态的。
默认的是使用静态的。
Cached
我们可以在一个lookup组件中为要查询的表配置cache。
当第一行数据进入lookup组件的时候,IntegrationService会在内存为它建立一个cache。
它分配内存基于你在组件或者session的属性中配置的数量。
IntegrationService把条件值保存索引cache,把output值保存在数据cache。
IntegrationService会为每一条进入这个组件的行查询cache。
IntegrationService也同样会建立cachefiles用$PMCacheDir(相对路径,在consol中可以配置)中默认的。
如果数据不适合内存cache时,IntegrationService把超出的数据保存到cachefiles中。
当seesion结束,IntegrationService会释放cache记忆和删除cachefiles,除非你配置组件使用持久化的cache。
如果你使用flatfilelookup,IntegrationService总是会把它放在cache中。
如果你配置flatfilelookup为sortedinput,IntegrationService不会把它放入cache,如果条件类不是分组的。
如果这些列是分组的,但是没有sorted,IntegrationService会处理这个查询的方式和没有配置sortedinput一样。
当你配置了lookupcache,你可以配置如下cache选项:
Buildingcaches:
你可以配置session建立多个cache用串行或者并行。
当你建立串行的cache时,IntegrationService会按照源行进入的顺序建立cache。
当你建立并行的cache时,IntegrationService不会等第一行进入Lookuptransformation,就会建立cache。
代替的是建立多个并行的cache。
Persistentcache:
你可以保存lookupcachefiles并重用他们在IntegrationService调用一个配置使用该cache的Lookuptransformation。
IntegrationService对PersistentCaches的处理:
MappingorSessionChangesBetweenSessions
NamedCache
UnnamedCache
IntegrationServicecannotlocatecachefiles.
Rebuildscache.
EnableordisabletheEnableHighPrecisionoptioninsessionproperties.
Failssession.
EditthetransformationintheMappingDesigner,MappletDesigner,orReusableTransformationDeveloper.*
Editthemapping(excludingLookuptransformation).
Reusescache.
Changedatabaseconnectionorthefilelocationusedtoaccessthelookuptable.
ChangetheIntegrationServicedatamovementmode.
ChangethesortorderinUnicodemode.
ChangetheIntegrationServicecodepagetoacompatiblecodepage.
ChangetheIntegrationServicecodepagetoanincompatiblecodepage.
*Editingpropertiessuchastransformationdescriptionorportdescriptiondoesnotaffectpersistentcachehandling.
Recachefromsource:
当持久化的cache不是同步的时候,你可以配置Lookuptransformation重新建立新的cache。
Staticcache:
你可以为所有的lookupsource配置一个静态,或者只读的cache。
默认的,IntegrationService建立静态的cache。
它为所有进入组件的lookupfile或者table以及looksupvalues建立cache。
当条件为真的时候,IntegrationService从cache中返回一个值。
Dynamiccache:
为一个targettable或者flatfilesource建立cache,并且向cache中插入新的行或者修改现有的行,当使用动态cache。
在cache中,IntegrationService动态的插入或者修改数据并且把数据传到目标中。
Sharedcache:
你可以共享cache在多个组件之间。
你可以共享一个匿名的cache在一张mapping中。
你可以共享一个有名的cache在同一个或者不同的mapping中。
当你没有为Lookuptransformation配置cache,IntegrationService为每一个输入行查询查询表。
结果和处理过程是同样的,不论你是否设置cache。
然而,使用cache可以改善session的性能。
当被查询的表很大的时候可以使用cache最大的优化性能。
CacheComparison
uncachedlookup,staticcache,dynamiccache的区别:
Uncached
StaticCache
DynamicCache
你不可以向cache中插入或者修改。
你可以向cache中插入或者修改,并且可以向目标传输。
不可以进行flatfile的查询。
可以进行relational或者flatfile的查询。
当条件为真的时候,IntegrationService从表或者cache中返回一个值。
当条件为假的时候,IntegrationService返回一个默认值或者为非连接组件返回NULL。
当条件为真的时候,IntegrationService会根据行的类型来修改或者放着它不管。
你可以向目标传输修改后的行。
当条件为假的时候,theIntegrationService会根据行的类型来插入或者放着它不管。
这意味着行不在cache或目标中。
你可以把插入的行传给目标表。
AggregatorTransformation
Transformationtype:
Active、Connected
功能概述:
可以使用该组件可以进行汇总计算,如平均值和求和等。
Aggregatortransformation和Expressiontransformation不一样,在Aggregatortransformation中执行计算是要分组的。
Expressiontransformation只允许你执行计算在row-by-row的基础上的。
当你使用transformation建立汇总表达式的时候,使用条件语句来过滤行,比SQL语句要灵活的多。
IntegrationService执行汇总计算,只读和储存必要的数据组和行数据在aggregatecache中的。
PortsintheAggregatorTransformation(AggregatorTransformation中的port)
配置AggregatorTransformation中的port,完成如下的任务:
输入表达式在任何outputport,使用条件或者非汇总函数在该port中。
建立多行汇总的outputport。
配置任何input,input/output,output,或者variableport作为groupport。
改进性能,为后来的组件只连接必要的input/outputport,减少数据cache的大小。
使用变量port作为本地变量。
建立一个连接像一个表达式一样。
ComponentsoftheAggregatorTransformation(汇总组件的组成)
汇总组件是一个active的组件,改变pipeline中的行数。
汇总组件拥有下面的构成和选项:
汇总表达式(Aggregateexpression):
在一个outputport中输入。
可以包括非汇总表达式和条件子句。
汇总函数(AggregateFunctions)
你可以把一个汇总函数嵌套在另一个汇总函数中。
Transformation语言包括如下的汇总函数:
●AVG
●COUNT
●FIRST
●LAST
●MAX
●MEDIAN
●MIN
●PERCENTILE
●STDDEV
●SUM
●VARIANCE
当你使用这些函数的时候,你必须在一个汇总组件的表达式中。
嵌套汇总函数(NestedAggregateFunctions):
你可以在一个汇总组件中的不同的outputport中包括多个单层的函数(相对于嵌套函数)和嵌套的函数。
但是你不能把他们放到一个汇总组件中。
因此,如果一个汇总组件中的任何一个outputport中包括一个单层函数,你不可以使用一个嵌套的函数在任何其他的port中在这个汇总组件中。
当你在一个汇总组件中同时包括单层函数和嵌套函数,Designer
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Informatica 常用组件使用方法 常用 组件 使用方法