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 (+).
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 (+).
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 { }.
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’.
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。]
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.
'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
- Lose transformation logic in metadata searched.
- Unable to utilize Partitioning or Pushdown Optimization options.
- Processing impacts database resources.
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.
相关推荐
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 项目的性质 心理学中,我们忙于对事物进行解释,或多或少会对用以解释的说辞感到乏味。 ——Robert Cummins[1] 在理论化[信息加工]水平,对可观测行为的解释……...
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 ....
标题《深度学习:心灵如何超越经验》所涉及的知识点涵盖了深度学习、人类认知的非单调变化,以及如何通过经验错误学习和信念转变来适应不断变化的环境。描述部分提到,尽管保留、处理和将先前经验投影到未来情境的...
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, ...
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 ...
The `file_detector_context` method overrides the current file detector in a limited context. It ensures that the original file detector is set afterward. - `file_detector_class`: Class of the desired...
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...
The Compatibility Definition Document (CDD) for Android 4.0 outlines the specific requirements that devices must meet in order to be considered compatible with this version of the operating system....
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.
Protected Overrides Function GetWebRequest(ByVal address As Uri) As System.Net.WebRequest Dim request As HttpWebRequest = CType MyBase.GetWebRequest(address), HttpWebRequest) request.Method = ...
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...
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 ...
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 ...
umpo-overrides
-- 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 ...
".equals()" should not be used to test the values of "Atomic" classes. - **解释**:`Atomic`类是Java并发编程中非常重要的组成部分,它们提供了原子操作的能力。然而,这些类没有重写`equals()`方法,因此...
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...
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 ...