Source and Target Definitions
Source and target definitions are the metadata the Integration Service reads from and writes to; this domain tests importing and creating them, Source Qualifier behaviour, flat-file properties and load options.
Core rules
- Sources may be relational tables or views, flat files, XML, COBOL/VSAM or application sources such as SAP and Salesforce. You import them from the database or file, or define them manually.
- Every relational source used in a mapping needs a Source Qualifier. Its default query selects the source columns; you can replace it with a SQL override, add a user-defined join, or add a source filter that the database evaluates.
- The Designer does not validate a SQL override. The columns returned must match the Source Qualifier ports in number, order and datatype, or the session fails or mis-maps silently.
- Number of Sorted Ports declares that the source already returns rows ordered by those ports, which lets you skip a Sorter before an Aggregator or Joiner.
- Flat files need correct file properties: delimiter, text qualifier, escape character, header lines to skip, code page, and fixed-width positions for fixed-width files.
- Targets carry database type, table name and column precision, plus overrides such as target table name and update override used with Update Strategy.
Worked example
A pipe-delimited export has one header row and double-quoted values. Import it as delimited, then set the delimiter to |, the text qualifier to ", and header lines to 1. If the file were fixed width you would instead choose Fixed Width and enter each column's start position and width.
Traps
- Overriding the SQL but leaving ports untouched when the query's shape changes.
- Expecting the Designer to catch query/port mismatches - it will not.
- Ignoring the code page on a file with accented characters, so rows load with corrupted values.