Source Qualifier Transformation

Source Qualifier Transformation

Source Qualifier is an :
(a) Active Transformation 
(b) Connected Transformation
(c) The Source Qualifier transformation represents the rows that the Integration Service reads when it runs a session. 
(d) It is only transformation that is not reusable. 
(e) Default transformation except in case of XML or COBOL files

When you add a relational or a flat file source definition to a mapping, you need to connect it to a Source Qualifier transformation. The Source Qualifier transformation represents the rows that the Integration Service reads when it runs a session.


Perform the following tasks with a Source Qualifier transformation :-

1. Join data originating from the same source database. You can join two or more tables with primary key foreign key relationships by linking the sources to one Source Qualifier transformation.
2. Filter rows when the Integration Service reads source data. If you include a filter condition, the Integration Service adds a WHERE clause to the default query.
3. Specify an outer join rather than the default inner join. If you include a user-defined join, the Integration Service replaces the join information specified by the metadata in the SQL query.
4. Specify sorted ports. If you specify a number for sorted ports, the Integration Service adds an ORDER BY clause to the default SQL query.
5. Select only distinct values from the source. If you choose Select Distinct, the Integration Service adds a SELECT DISTINCT statement to the default SQL query.
6. Create a custom query to issue a special SELECT statement for the Integration Service to read source data. For example, you might use a custom query to perform aggregate calculations.

Source Qualifier Transformation Sample :-

Source Qualifier Joining data originating from the same source database :-




Source Qualifier Properties :-



1) SOURCE FILTER: 
Specifies the filter condition the Integration Service applies when querying rows. 

2) NUMBER OF SORTED PORTS: 
Indicates the number of columns used when sorting rows queried from relational sources. If you select this option, the Integration Service adds an ORDER BY to the default query when it reads source rows.The ORDER BY includes the number of ports specified, starting from the top of the transformation.
When selected, the database sort order must match the session sort order. 
By default it is 0. If we change it to 1, then the data will be sorted by column that is at the top in SQ. 
Example: 

SELECT 
EMPNO,
EMP_NAME,
DEPTNO,
DEPT_NAME 
FROM EMPLOYEE

in above SQL, present in default query.

- If we want to sort as per EMP_NAME, then we need to change it to 2. 
- If we change it to 2, then data will be sorted by top two columns. Fisrt it will be sorted by EMP_NAME then if a conflict occurs it will be sorted by EMPNO.

3) SELECT DISTINCT: 
Specifies if you want to select only unique rows. The Integration Service includes a SELECT DISTINCT statement in default query if you choose this option. 
- Just check the option in Properties tab to enable it. 

4) PRE and POST SQL Commands :
- Pre-session SQL commands - are the commands that run against the source database before the Integration Service reads the source. 
- Post-session SQL commands - are the commands that run against the source database after Integration Service writes to the target. 
- Use a semi-colon (;) to separate multiple statements. 

5) USER DEFINED JOINS :
Specifies the condition used to join data from multiple sources represented in the same Source Qualifier transformation 
- We can specify equi join, left outer join and right outer join only. We Cannot specify full outer join. To use full outer join, we need to write SQL Query. 

SQL Join syntax you can use 
Join Type   --> Syntax 
Equi Join   --> DEPT.DEPTNO=EMP.DEPTNO 
Left Outer Join --> EMP LEFT OUTER JOIN DEPT ON DEPT.DEPTNO=EMP.DEPTNO
Right Outer Join --> EMP RIGHT OUTER JOIN DEPT ON DEPT.DEPTNO=EMP.DEPTNO

Informatica Join Synatx you can use
Equi Join   --> { source1 INNER JOIN source2 on join_condition } e.g. { CUSTOMER INNER JOIN PURCHASES on CUSTOMER.CUST_ID = PURCHASES.CUST_ID }
Left Outer Join   --> { source1 LEFT OUTER JOIN source2 on join_condition } e.g. { CUSTOMER  LEFT OUTER JOIN PURCHASES on CUSTOMER.CUST_ID = PURCHASES.CUST_ID }
Right Outer Join --> { source1 RIGHT OUTER JOIN source2 on join_condition } e.g. { CUSTOMER  RIGHT OUTER JOIN PURCHASES on CUSTOMER.CUST_ID = PURCHASES.CUST_ID }

Note: Brackets {} must be included while using infa syntax .

Both Synatx are valid and works in query overvride in Informatica.

6) SQL QUERY :
Defines a custom query that replaces the default query the Integration Service uses to read data from sources represented in this Source Qualifier transformation. A custom query overrides entries for a custom join or a source filter.

SAMPLE MAPPING USING SOURCE QUALIFIER

Mapping Creation

1. Open folder where we want to create the mapping by double clicking it or by right click and select open option. 
2. Click Tools -> Mapping Designer. 
3. Click Mapping-> Create-> Give mapping name. Ex: m_source_qualifier_demo 
4. Drag EMPLOYEE soucre and SALES Target. 
5. Drag all the port from source qualifier to Expression tranformation. 
6. Create an output port OUT_SALES and give the expression IIF(TOTAL_SALES>10,TOTAL_SALES+0.5,TOTAL_SALES). 
7. Drag all port from expression except total sales and put it in target SALES 
8. Link all as shown in above picture.
9. Mapping -> Save. 
10. Mapping -> Validate 
11. Repository -> Save 
12. Create Session and Workflow
13. Run session and see execution in Monitor.

Troubleshooting Source Qualifier Transformations:-

Problem 1. I cannot perform a drag and drop operation, such as connecting ports.
Solution Review the error message on the status bar for details.

Problem 2. I cannot connect a source definition to a target definition.
Solution 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.

Problem 3. I cannot connect multiple sources to one target.
Solution The Designer does not allow you to connect multiple Source Qualifier transformations to a single target. There are two workarounds:
(a) Reuse targets. Since target definitions are reusable, you can add the same target to the mapping multiple times. Then connect each Source Qualifier transformation to each target.
(b) Join the sources in a Source Qualifier transformation. Then remove the WHERE clause from the SQL query.

42 comments:

  1. Excellent post on Informatica. It is really helpful, keep sharing more like this.
    Regards,
    Informatica Training in Chennai | Informatica course in Chennai

    ReplyDelete
  2. Excellent site....concepts are very clearly explained...

    ReplyDelete
  3. Thanks for sharing such a valuable information,it was very useful.this post will help a person to gain his/her speaking skills,looking forward to get a fruitful information on further topics. Authorized Dot Net training in chennai

    ReplyDelete
  4. Nice article Thanks for sharing this article Wonderful information from this website Thanks !!!


    Embedded training in chennai | Embedded training centre in chennai | PLC Training institute in chennai

    ReplyDelete
  5. It is nice blog Thank you provide important information and i am searching for same information to save my time Informatica Online Training

    ReplyDelete
  6. Your new valuable key points imply much a person like me and extremely more to my office workers. With thanks; from every one of us.
    Big Data Analytics Online Training

    ReplyDelete
  7. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
    Devops training in Chennai
    Devops training in Bangalore
    Devops training in Pune
    Devops Online training
    Devops training in Pune
    Devops training in Bangalore
    Devops training in tambaram

    ReplyDelete
  8. Really very nice blog information for this one and more technical skills are improve,i like that kind of post.

    Devops training in Chennai
    Devops training in Bangalore
    Devops Online training
    Devops training in Pune

    ReplyDelete
  9. This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
    java training in chennai | java training in bangalore

    java training in tambaram | java training in velachery

    java training in omr

    ReplyDelete
  10. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.

    java training in annanagar | java training in chennai

    java training in marathahalli | java training in btm layout

    java training in rajaji nagar | java training in jayanagar

    java training in chennai

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete



  12. This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. 

    angularjs Training in online

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs Training in btm

    ReplyDelete
  13. I appreciate your efforts because it conveys the message of what you are trying to say. It's a great skill to make even the person who doesn't know about the subject could able to understand the subject . Your blogs are understandable and also elaborately described. I hope to read more and more interesting articles from your blog. All the best.
    python training in OMR
    python training in tambaram
    python training in annanagar

    ReplyDelete
  14. Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us
    Python training in pune
    AWS Training in chennai
    Python course in chennai

    ReplyDelete
  15. Really you have done great job,There are may person searching about that now they will find enough resources by your post
    selenium training in electronic city | selenium training in electronic city

    ReplyDelete
  16. Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
    Informatica Training
    Salesforce Training

    ReplyDelete
  17. Read all the information that i've given in above article. It'll give u the whole idea about it.
    AWS Classes

    Azure Classes

    ReplyDelete
  18. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...

    Selenium online Training | Selenium Training in Pune | Selenium Training in Bangalore

    ReplyDelete
  19. Thank you so much for sharing this worth able content with us. The concept taken here will be useful for my future programs and i will surely implement them in my study. Keep blogging article like this.Thank You
    aws online training
    aws training in hyderabad
    aws online training in hyderabad

    ReplyDelete
  20. All are saying the same thing repeatedly, but in your blog I had a chance to get some useful and unique information, I love your writing style very much, I would like to suggest your blog in my dude circle, so keep on updates.
    angularjs interview questions and answers

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs online Training

    angularjs Training in marathahalli

    angularjs interview questions and answers

    ReplyDelete

  21. A lot of new things learnt from this post.thanks for sharing the information.keep posting on new things.
    aws online training
    aws training in hyderabad
    amazon web services(AWS) online training

    ReplyDelete
  22. Its fantatic explaintion lot of information gather it...nice article....
    Devops Training in Chennai | Devops Training Institute in Chennai

    ReplyDelete
  23. Nice post. I learned some new information. Thanks for sharing.

    Education
    Technology

    ReplyDelete
  24. This comment has been removed by the author.

    ReplyDelete
  25. You have provided a nice article, Thank you very much for this one. And I hope this will be useful for many people. Salesforce Training Certification

    ReplyDelete
  26. This comment has been removed by the author.

    ReplyDelete
  27. This comment has been removed by the author.

    ReplyDelete
  28. Thank you for highlighting and scrutinising the best and most complex tool which is powerful and easy to solve.

    Informatica Read Rest API

    ReplyDelete
  29. Title:
    Best Software Training Center in Chennai | Infycle Technologies

    Description:
    Want to set your career towards the software field? Then join hands with Infycle Technologies to make this into reality. Infycle Technologies, the best software training institute in Chennai, gives the combined and best software training in Chennai, with various stages of multiple courses such as Big Data, Python, Data Science, Oracle, etc., which will be guided by professional tutors in the field. The Hands-on practical training and the mock interview sessions will be given to the candidates to face the interviews with full confidence. Apart from all, the candidates will be placed in the top MNC's with the highest salary package in the market. To get it all, call 7502633633 and make this happen for your happy life.
    Best training institute in Chennai

    ReplyDelete
  30. Title:
    Grab Oracle DBA Training in Chennai | Infycle Technologies

    Description:

    Set your career goal towards Oracle for a wealthy future with Infycle. Infycle Technologies is the best software training institute in Chennai, which gives the most trusted and best Oracle DBA Training in Chennai with hands-on practical training that will be guided by professional tutors in the field. In addition to this, the mock interviews will be given to the candidates, so that they can face the interviews with full confidence. Apart from all, the candidates will be placed in the top MNC's with a great salary package. To get it all, call 7502633633 and make this happen for your happy life.

    best training institute in chennai

    ReplyDelete