`

How to Avoid The Usage of SQL Overrides in Informatica PowerCenter Mappings

阅读更多
resource link:http://www.disoln.org/2014/03/How-to-Avoid-The-Usage-of-SQL-Overrides-in-Informatica-PowerCenter-Mappings.html
Many Informatica PowerCenter developers tend to use SQL Override during mapping development. Developers finds it easy and more productive to use SQL Override. At the same time ETL Architects do not like SQL Overrides as it hide the ETL logic from metadata manager. In this article lets see the options available to avoid SQL Override in different transformations.

What is SQL Override

Transformations such as Source Qualifier and LookUp provides an option to override the default query generated by PowerCenter. You can enter any valid SQL statement supported by the underlying database. You can enter your own SELECT statement with a list of columns in the SELECT clause of the SQL, which is matching with the transformation ports. The SQL can perform aggregate calculations, or call a stored procedure or stored function to read the data.

Source Qualifier Options to Avoid SQL Override

There are few options available in source qualifier to avoid the usage of SQL Override. These can be effectively used to avoid the usage of SQL override.

1. User Defined Join

User defined join option provides the most flexible options to avoid the usage of SQL Override. You need to enter only the contents of the WHERE clause of your SQL, not the entire query in user defined join option.

If the JOIN Syntax of your query is entirely with in the WHERE clause, you can directly enter the WHERE clause of your query into the user defined join option, with out any modification. Oracle still supports the old way of join using(+), which is with in the WHERE clause. Where as most of the other databases uses the latest JOIN syntax, which uses the JOIN syntax in the FROM clause.

Below image shows the left outer join between CUSTOMER table and PURCHASES table. This join uses the Oracle Join syntax (+).
How to Avoid The Usage of SQL Overrides in Informatica PowerCenter Mappings
Note :- You can not use the above option, if the JOIN Syntax of your query is with in the FROM clause.

Informatica Join Syntax

If the JOIN Syntax of your query is written with in the FROM clause, you should use the Informatica Join Syntax in the user defined join option. When you use the Informatica join syntax, the Integration Service insert the join syntax in the WHERE clause or the FROM clause of the query, depending on the underlying database syntax.
 
Informatica Join supports, Normal, Left Outer and Right Outer Joins and here is the join syntax.
 
  • Normal Join :-  { source1 INNER JOIN source2 on join_condition }
  • Left Outer Join :- { source1 LEFT OUTER JOIN source2 on join_condition }
  • Right Outer Join :- { source1 RIGHT OUTER JOIN source2 on join_condition }
 
 
Note :-  Enclose Informatica join syntax in braces { }
How to Avoid The Usage of SQL Overrides in Informatica PowerCenter Mappings
Above shown image is displaying the Informatica Join Syntax. Using the user defined join option, CUSTOMER table is left outer joined with PURCHASES table as shown in the above image.

2. Source Filter

Source filter option can be used to adjust the ‘WHERE’ clause of the SQL created by the integration service, with out using the SQL Override option. You can enter a source filter to reduce the number of rows the Integration Service queries. You can provide the source filter condition with out giving the string ‘WHERE’. 

How to Avoid The Usage of SQL Overrides in Informatica PowerCenter Mappings
Source filter option is used to filter source data based on the Customer ID.

3. Sorted Ports

Using the sorted ports option, you can sort the source data. When using sorted port option, Integration Service adds the ports to the ORDER BY clause in the default query. The Integration Service adds the configured number of ports, starting at the top of the Source Qualifier transformation. The sorted ports are applied on the connected ports rather than the ports that start at the top of the Source Qualifier transformation.[1.集成服务根据配置的Number of sorted ports对Source Qualifier 组件自上而下的生成order by 条件;如A B C D四个字段,Number of sorted ports为2 生成的order by为 order by A,B。 2.sorted ports只应用在连接的字段上,如A B C D四个字段,Number of sorted ports为2,但是A字段没有向后连接,生成的order by 为order by B,C。]

How to Avoid The Usage of SQL Overrides in Informatica PowerCenter Mappings

Based on the setting above, source data is sorted on the first two connected ports from the source qualifier to the downstream transformations. The data is sourced in the ascending order.

4. Select Distinct

 
If you want the Integration Service to select unique values from a source, use the Select Distinct option. Using Select Distinct filters out unnecessary data earlier in the data flow, which might improve performance. 

How to Avoid The Usage of SQL Overrides in Informatica PowerCenter Mappings
'Select Distinct' option can be set in source qualifier as shown in the above image.

Advantages and Limitations of SQL Override

Pros

  • Utilize database optimizers techniques such as indexes, hints. 
  • Can accommodate complex queries.

Cons 

Hope you enjoyed this article. Feel free to ask any further questions or clarification you may have below in the comment section. We are happy to help you with.
分享到:
评论

相关推荐

    微软内部资料-SQL性能优化5

    In a nonclustered index, the leaf level contains each index key, plus a bookmark that tells SQL Server where to find the data row corresponding to the key in the index. A bookmark can take one of two ...

    深层学习:心智如何超越经验 Deep Learning How the Mind Overrides Experience

    Deep Learning: How the Mind Overrides Experience 项目的性质 心理学中,我们忙于对事物进行解释,或多或少会对用以解释的说辞感到乏味。 ——Robert Cummins[1] 在理论化[信息加工]水平,对可观测行为的解释……...

    Deep Learning_ How the Mind Overrides Experience

    Deep leraning and how the memory overrides experience

    Google C++ Style Guide(Google C++编程规范)高清PDF

    The definition of an inline function needs to be in a header file, so that the compiler has the definition available for inlining at the call sites. However, implementation code properly belongs in ....

    Effective C# (Covers C# 4.0) Mar 2010

    Item 42: Understand How to Make Use of the Expression API 254 Item 43: Use Expressions to Transform Late Binding into Early Binding 261 Item 44: Minimize Dynamic Objects in Public APIs 267 Chapter 6 ...

    servlet2.4doc

    Causes the next filter in the chain to be invoked, or if the calling filter is the last filter in the chain, causes the resource at the end of the chain to be invoked. doFilter(ServletRequest, ...

    CE中文版-启点CE过NP中文.exe

    Added cut/copy/paste context menu items to pointer offset fields in add/change address, and added a context menu to the pointer destination Added an automated structure compare for two groups of ...

    uhdd.sys源码

    It uses only 656 to 752 bytes of upper memory depending on the system and it can also load in 640K DOS memory RDISK is a simple and small RAMdisk driver for use when resizing or other features are...

    SuperBlogger: blogging for Joomla! 1.5 just got easier and more powerful!

    SuperBlogger is a new powerful plugin adding ...SuperBlogger's features can easily be set in the plugin's parameters, so you can choose which elements you want to make use of in your Joomla! website.

    一个win32下的ARM开源编译器

    If you need to avoid the automatic "IT AL" block insertion you can force affected instructions to use the wide encoding with a .W suffix. thumb ;use UAL syntax sub.w r0,r1 ;32-bit encoding forced...

    Replacing "RICHEDIT" control with "RichEdit20A"

    The first thing to do it change the window class name of the rich edit controls from "RICHEDIT" to "RichEdit20A" in the *.rc file. Next, we create a class derived from CRichEditCtrl called ...

    Ubuntu使用手册(中文)

    Usage: vlc [options] [stream] ... You can specify multiple streams on the commandline. They will be enqueued in the playlist. The first item specified will be played first. Options-styles: --option ...

    C++继承的经典程序

    // constructor, initializer used to initialize the base part of a Derived object. Derived( int i, int j ) : Base(i), d_number(j) { }; // a new member function that overrides the print( ) function ...

    hadoop,spark,hbase,zookeeper,kafka配置文件

    -- Put site-specific property overrides in this file. --> <name>fs.defaultFS <value>hdfs://master:9000 <name>hadoop.tmp.dir <value>file:/home/bigData/bigdata/hadoop/tmp ...

    MEMDump utillity

    MEMDump utility is designed to dump or copy any part of 4GB linear memory address space under MS-DOS and Windows 9x DOS to a console, text or binary file. You can use MEMDump for dump contents of PCI...

    jQueryImageGallery.zip

    show: 'scale', // The effect to be used when the dialog is opened hide: 'explode', // The effect to be used when the dialog is closed offsetWidth: 50, // Offset of image width to viewport width ...

    import-map-overrides:浏览器和NodeJS javascript库,用于覆盖导入映射

    import-map-overrides库允许您通过将替代存储在本地存储中来动态更改javascript模块的url。 这使开发人员可以在模块开发期间覆盖各个模块以指向其本地主机,而不必与所有其他模块和后端服务器一起启动本地环境。 ...

    requests-1.2.3.tar.gz

    Requests is an Apache2 Licensed HTTP library, written in Python, for human beings. ... It requires an enormous amount of work (even method overrides) to perform the simplest of tasks.

    大数据集群搭建.pdf

    You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ...

    man-pages-overrides-7.9.0-1.el7.x86_64.rpm

    官方离线安装包,测试可用。请使用rpm -ivh [rpm完整包名] 进行安装

Global site tag (gtag.js) - Google Analytics