Transformations > Target Transformation > File Target Properties
  

File Target Properties

You can configure properties for file targets.
The following table describes the details for file targets:
File Detail
Description
Connection
Name of the target connection.
Object
Name of the target object.
Formatting Options
Flat file format options. Opens the Formatting Options dialog box to define the format of the file.
You can choose either a delimited or fixed-width file type. Default is delimited.
To write to a delimited flat file type, configure the following file format options:
  • - Delimiter. Delimiter character.
  • - Text Qualifier. Character to qualify text.
  • - Escape character. Escape character.
  • - Field labels. Determines if the Mapping Configuration task generates field labels or imports labels from the source file.
  • - First data row. The first row of data. The task starts the read at the row number that you enter.
To write to a fixed-width flat file type, select the fixed-width file format to use. If you do not have a fixed-width file format, click Configure > Fixed Width File Formats to create one.
The following table describes the advanced options for flat file targets:
Property
Description
Forward Rejected Rows
Forwards rejected rows to the next transformation or drops them. By default, the Mapping Configuration task forwards rejected rows to the next transformation. The Mapping Configuration task flags the rows for reject and writes them to the reject file. If you do not forward rejected rows, the Mapping Configuration task drops rejected rows and writes them to the session log.
If you enable row error handling, the Mapping Configuration task writes the rejected rows and the dropped rows to the row error logs. It does not generate a reject file. If you want to write the dropped rows to the session log in addition to the row error logs, you can enable verbose data tracing.
Append if Exists
Appends the output data to the target files and reject files for each partition. You cannot use this option for FTP/SFTP target files.
If you do not select this option, the Mapping Configuration task truncates each target file before writing the output data to the target file. If the file does not exist, the Mapping Configuration task creates it.
Header Options
Creates a header row in the file target. You can choose the following options:
  • - No Header. Do not create a header row in the flat file target.
  • - Output Field Names. Create a header row in the file target with the output field names.
  • - Use header command output. Use the command in the Header Command field to generate a header row. For example, you can use a command to add the date to a header row for the file target.
Default is No Header.
Header Command
Command used to generate the header row in the file target. For example, you can use a command to add the date to a header row for the file target.
Footer Command
Command used to generate the footer row in the file target.
Output Type
Type of target for the task. Select File to write the target data to a file target. Select Command to output data to a command. You cannot select Command for FTP/SFTP target connections.
Output File Directory
Name of output directory for a flat file target. By default, the Mapping Configuration task writes output files in the service process variable directory, $PMTargetFileDir.
You can also use the $OutputFileName session parameter to specify the file directory.
Reject File Directory
Directory path to write the reject file. By default, the Mapping Configuration task writes all reject files to the service process variable directory, $PMBadFileDir.
If you specify both the directory and file name in the Reject File Name field, clear this field. The Mapping Configuration task concatenates this field with the Reject File Name field when it runs the task.
Reject File Name
File name, or file name and path of the reject file. By default, the Mapping Configuration task names the reject file after the target object name: <target name>.bad.
The Mapping Configuration task concatenates this field with the Reject File Directory field when it runs the task. For example, if you have C:\reject_file\ in the Reject File Directory field, and enter filename.bad in the Reject File Name field, the Mapping Configuration task writes rejected rows to C:\reject_file\filename.bad.