
Observe the DISTINCT, WHERE and ORDER BY clauses in the SQL query generated. ORDER BY employees.employee_id, employees.name Now follow the steps for "Generating the SQL query" and generate the SQL query.
Tick the check box for the "Select Distinct" property. This value (2) means to sort the data on the first two ports in the source qualifier transformation. Go to the "Number Of Sorted Ports" property and enter a value (Example: 2). Select "Source Filter" property, open the editor and enter the filter condition (Example: partment_id=100) and click OK. Specifying the "Source Filter, Number Of Sorted Ports and Select Distinct" properties:įollow the below steps for specifying the filter condition, sorting the source data and for selecting the distinct rows. The SQL query generated contains only the columns or ports which are connected to the downstream transformations. Note: You can generate the SQL query only if the output ports of source qualifier transformation is connected to any other transformation in the mapping. You can write your own SQL query rather than relaying the default query for performing calculations. The default query generated in this case is Then open the SQL Editor, select the "ODBC data source" and enter the username, password. Go to the Properties tab, select "SQL Query" property. To view the default query generated, just follow the below steps: Viewing the Default Query or Generating the SQL query:įor relational sources, the Integration Service generates a query for each Source Qualifier transformation when it runs a session. To Understand the following, Please create the employees and departments tables in the source and emp_dept table in the target database. Note: For flat file source definitions, all the properties except the Tracing level will be disabled. Specify only when the order of the source output is same between the session runs. Specify only when the source output does not change between session runs. Post-session SQL commands to run against the source database after the Integration Service writes to the target. Pre-session SQL commands to run against the source database before the Integration Service reads the source. To select only unique rows from the source. Sets the amount of detail included in the session log when you run a session containing this transformation. Specifies the filter condition the Integration Service applies when querying rows. To specify a custom query which replaces the default query.Ĭondition used for joining multiple sources. Select the Source Qualifier transformation.
This will create the source qualifier transformation automatically.įollow the below steps to create the source qualifier transformation manually. The easiest method to create a source qualifier transformation is to drag the source definition in to a mapping.
Custom SQL Query: You can write your own SQL query to do calculations.Ĭreating Source Qualifier Transformation:. The Integration Service adds a SELECT DISTINCT statement to the default SQL query. Distinct rows: You can get distinct rows from the source by choosing the "Select Distinct" property.
The Integration Service adds an ORDER BY clause to the default SQL query Sorting input: You can sort the source data by specifying the number for sorted ports.The integration service adds a WHERE clause to the default query. Filter rows: You can filter the rows from the source database.This can be changed by explicitly specifying the join condition in the "user-defined join" property. By default the sources are joined based on the primary key-foreign key relationships. Joins: You can join two or more tables from the same source database.The source qualifier transformation is used to do the following tasks: So, you should not alter the data types of the ports in the source qualifier transformation. The source qualifier transformation converts the source data types to the Informatica native data types. You need to connect the source qualifier transformation to the relational or flat file definition in a mapping. The source qualifier transformation is an active,connected transformation used to represent the rows that the integrations service reads when it runs a session.