SQ Transformation in Informatica - Google Search
SQ Transformation in Informatica - Google Search
Reference
F r i d a y, M a r c h 2 2 , 2 0 1 3
Sample Mapping:
Properties Tab:
1) SQL Override:
By default Integration Service generates a query based on
the ports that are mapping from SQ (Source Qualifier) to
Next Transformation, including if any constraints defined
at Source Analyzer after source definition imported.
Steps:
1. Right Click on SQ --> Edit --> select 'Properties Tab'
Steps:
1. Right Click on SQ --> Edit --> select 'Properties Tab'
2. Click on the 'Open Button' highlighted below and the
SQL Editor will be appear
3. Entry the join condition as below.
3) Source Filter:
By specifies the filter condition we are adding it to/as
'WHERE' clause to the default/customize query to which
the Integration Service applies when querying rows.
Steps:
1. Right Click on SQ --> Edit --> select 'Properties Tab'
2. Click on the 'Open Button' highlighted below and the
SQL Editor will be appear
3. Entry the Filter condition as below.
Steps:
1. Right Click on SQ --> Edit --> select 'Properties Tab'
2. Entry the number to sort the no of ports.
5) Select Distinct:
If you want to select only unique rows (non duplicate).
The Integration Service includes a SELECT DISTINCT
statement if you choose this option.
Steps:
1. Right Click on SQ --> Edit --> select 'Properties Tab'
2. Just check 'Select Distinct' box
6) Pre-SQL:
I. Pre-session SQL commands to run against the
source database before the Integration Service
reads the source.
II. It can have multiple statements separated by
(;) with commit;
7) Post-SQL:
I. Post-session SQL commands to run against the
source database after the Integration Service
writes to the target.
II. It can have multiple statements separated by
(;) with commit;
For example:
I want to pass “DeptNo” on the run time. So I have a
mapping parameter/variable defined at mapping level.
TIPS:
1. To ensure the format of a datetime parameter or
variable matches that used by the source, validate
the SQL query.
2. When you override the default SQL query, you must
enclose all database reserved words in quotes.
3. If the source table has more than 1,000 rows, you
can increase performance by indexing the primary
key-foreign keys. If the source table has fewer than
1,000 rows, you might decrease performance if you
index the primary key-foreign keys.
4. You can resize the Expression Editor. Expand the
dialog box by dragging from the borders. The
Designer saves the new size for the dialog box as a
client setting.
5. When you enter a source filter in the session
properties, you override the customized SQL query
in the Source Qualifier transformation.
6. You can also use the Sorter transformation to sort
relational and flat file data before Aggregator and
Joiner transformations.
7. Sybase supports a maximum of 16 columns in an
ORDER BY clause. If the source is Sybase, do not
sort more than 16 columns.
8. You can also enter pre- and post-session SQL
commands on the Properties tab of the target
instance in a mapping.
Warning:
If you configure a transformation as repeatable and
deterministic, it is your responsibility to ensure that the
data is repeatable and deterministic. If you try to recover
a session with transformations that do not produce the
same data between the session and the recovery, the
recovery process can result in corrupted data.
Disadvantages:
1. You cannot directly connect sources to targets.
Instead, you need to connect them through a
Source Qualifier transformation for relational and
flat file sources, or through a Normalizer
transformation for COBOL sources. Because the
Source Qualifier converts all database types into
Informatica datatypes.
2. The Designer does not allow you to connect multiple
Source Qualifier transformations to a single target.
There are two workarounds:
Gowtham
30 comments:
Replies
Reply