Connections for INFACore > Connections to source and target endpoints > Flat File
  

Flat File

Create a Flat File connection to read from or write to a flat file.

Feature snapshot

Operation
Support
Read
Yes
Write
Yes

Connection properties

The following table describes the flat file connection properties:
Connection Property
Description
Connection Name
Name of the connection.
Each connection name must be unique within the organization. Connection names can contain alphanumeric characters, spaces, and the following special characters: _ . + -,
Maximum length is 255 characters.
Directory
Directory where the flat file is stored and must be accessible by the agent.
Enter the full directory or click Browse to locate and select the directory.
When you use the connection, you can select a file that's contained in the directory or in any of its subdirectories.
Maximum length is 100 characters. Directory names can contain alphanumeric characters, spaces, and the following special characters:
/ \ : _ ~
The directory is the service URL for this connection type.
Note: On Windows, the Browse for Directory dialog box does not display mapped drives. You can browse My Network Places to locate the directory or enter the directory name in the following format: \\<server_name>\<directory_path>. If network directories do not display, you can configure a login for the Secure Agent service.
Do not include the name of the flat file. You specify the file name when you create the task.
Browse button
Use to locate and select the directory where flat files are stored.
Date Format
Date format for date fields in the flat file. Default date format is:
MM/dd/yyyy HH:mm:ss
Code Page
The code page of the system that hosts the flat file. Select one of the following code pages:
  • - MS Windows Latin 1. Select for ISO 8859-1 Western European data.
  • - UTF-8. Select for Unicode data.
  • - UTF-16 encoding of Unicode (Big Endian).
  • - UTF-16 encoding of Unicode (Lower Endian).
  • - Shift-JIS. Select for double-byte character data.
  • - ISO 8859-15 Latin 9 (Western European).
  • - ISO 8859-2 Eastern European.
  • - ISO 8859-3 Southeast European.
  • - ISO 8859-5 Cyrillic.
  • - ISO 8859-9 Latin 5 (Turkish).
  • - IBM EBCDIC International Latin-1.
  • - Japanese EUC (with \ <-> Yen mapping
  • - IBM EBCDIC Japanese
  • - IBM EBCDIC Japanese CP939
  • - PC Japanese SJIS-78 syntax (IBM-942)
  • - PC Japanese SJIS-90 (IBM-943)
  • - MS Windows Traditional Chinese, superset of Big 5
  • - Taiwan Big-5 (w/o euro update)
  • - Chinese EUC
  • - ISO 8859-8 Hebrew
  • - PC Hebrew (old)
  • - PC Hebrew (w/o euro update)
  • - EBCDIC Hebrew (updated with new sheqel, control characters)
  • - IBM EBCDIC US English IBM037
If the file contains supplementary characters with UTF-16 encoding, the task fails.
Note: When you use a flat file connection with the Shift-JIS code page and a UTF data object, be sure to install fonts that fully support Unicode.

Read properties

The following table describes the advanced source properties that you can configure in the Python code to read from a flat file:
Property
Description
Tracing Level
Detail level of error and status messages that Data Integration writes in the session log. You can choose terse, normal, verbose initialization, or verbose data. Default is normal.
Thousand Separator
Thousand separator character. Can be none, comma, or period. Cannot be the same as the decimal separator or the delimiter character.
Field type must be Number. You might also need to update the field precision and scale.
Default is None.
Decimal Separator
Decimal character. Can be a comma or period. Cannot be the same as the thousand separator or delimiter character.
Field type must be Number. You might also need to update the field precision and scale.
Default is Period.
Source File Directory
For flat file sources, name of the source directory.
For FTP sources, name and path of the local source file directory used to stage the source data.
By default, the mapping task reads source files from the source connection directory.
You can also use an input parameter to specify the file directory.
If you use the service process variable directory $PMSourceFileDir, the task writes target files to the configured path for the system variable. To find the configured path of a system variable, see the pmrdtm.cfg file located at the following directory:
<Secure Agent installation directory>\apps\Data_Integration_Server\<Data Integration Server version>\ICS\main\bin\rdtm
You can also find the configured path for the $PMSourceFileDir variable in the Data Integration Server system configuration details in Administrator.
Source File Name
For flat file sources, file name, or file name and path of the source file.
You can also use an input parameter to specify the file name.
For FTP sources, name of the local source file used to stage the source data.
Remote File Name
For FTP sources, file name, or file name and path of the remote file.
You can also use an input parameter to specify the remote file name.
File Reader Truncate String Null
For flat file sources, truncates string field values from the first null character.
Enable when the source file contains null characters.
Do not enable when you use the FileRdrTreatNullCharAs custom property. Using both properties creates conflicting settings for how Data Integration handles null characters in a flat file source, and the task fails.
Default is disabled.
Note: Tracing level is not applicable for INFACore.

Write properties

The following table describes the advanced target properties that you can configure in the Python code to write to a flat file:
Property
Description
Forward Rejected Rows
Causes the mapping task to forward rejected rows to the reject file.
If you do not forward rejected rows, the mapping task drops rejected rows and writes them to the session log.
If you enable row error handling, the mapping 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.
Thousand Separator
Thousand separator character. Can be none, comma, or period. Cannot be the same as the decimal separator or the delimiter character.
Field type must be Number. You might also need to update the field precision and scale.
Default is None.
Decimal Separator
Decimal character. Can be a comma or period. Cannot be the same as the thousand separator or delimiter character.
Field type must be Number. You might also need to update the field precision and scale.
Default is Period.
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 task truncates each target file before writing the output data to the target file. If the file does not exist, the mapping task creates it.
Create Target Directory
Creates the target directory if it doesn't exist as specified in the Output file directory field.
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 Name
File name or file name and path of the output file. By default, the mapping task names output files after the target object.
Output File Directory
Name of the output directory for a flat file target. By default, the mapping task writes output files to the target connection directory.
You can also use an input parameter to specify the target file directory.
If you use the service process variable directory $PMTargetFileDir, the task writes target files to the configured path for the system variable. To find the configured path of a system variable, see the pmrdtm.cfg file located at the following directory:
<Secure Agent installation directory>\apps\Data_Integration_Server\<Data Integration Server version>\ICS\main\bin\rdtm
You can also find the configured path for the $PMTargetFileDir variable in the Data Integration Server system configuration details in Administrator.
Reject File Directory
Directory path to write the reject file. By default, the mapping task writes all reject files to the following service process variable directory:
$PMBadFileDir/<federated task ID>
If you specify both the directory and file name in the Reject File Name field, clear this field. The mapping 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 task names the reject file after the target object name: <target name>.bad.
The mapping 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 task writes rejected rows to C:\reject_file\filename.bad.
Note: Forward Rejected Rows property is not applicable for INFACore.