Source Or Target Text File Requirements
Source or Target text files are the equivalent of tables within a database. The directory where the text files reside is the database or container, and each text file or set of related text files is an entity.
Each entity has its own properties, such as field names and data types, similar to the properties of a SQL table. These properties can be configured using the tabs within the Text Connector configuration dialog.
Binary and Text Content files are not parsed, but treated as entire files. The contents of those files can be copied to new files in another directory and renamed. Each file is considered an entity.
Text files used as a source or as a target for the Text Connector have particular location and format requirements. Review the information below before setting up text files. Text files must exist before you configure a Text File as Source Connection.
For Text File as Target Connections you can either enter the entity and field names when configuring the Connection or create target text files ahead of time to be used as the framework for the inbound data. If you enter entity and field names on the Connection dialog, the text file is generated automatically when the Map using that Connection is executed. If you create the target text files ahead of time, you can automatically configure the entities and field names by calling the target file from the Text File as Target Connection dialog.
- Store the text files together in a specific directory that acts as a container or database.Note: If you store or create text files in a local directory, make sure that directory is not under one of your Connector folders. Any time a Connector is updated, the Connector folder and all of its contents are deleted and replaced with the updated Connector files. A best practice is to local text files in a folder under the Data Exchange folder, which is typically found in the following location: C:\Program Files (x86)\Scribe Software\TIBCO Scribe® Online Agent\DataExchange
- Create a text file for each set of data needed. Each text file represents a separate table in the database. For example, you might have a Contacts text file and an Accounts text file with different information.
- Valid file extensions are .txt or .csv.
- Each text file should have a header row containing the field names of the fields included in the file. If the file does not have a header row, fields are named Field 1, Field 2, etc. You can modify field names on the Fields tab of the Connection dialog. Those field names display when creating Maps using the Text File as Source or Text File as Target Connection.
- Fields can be delimited or fixed width.
- For fields that are delimited, the delimiter can be Tab, Comma, Space, or a user specified character.
- For fields that are fixed width, refer to Fixed Width Data In Source And Target Text Files for detailed requirements.
- Text qualifiers include Double quote, Single quote, a user specified designation, or None.
- For files containing numbers, decimal symbol options include Period, Comma, or a user specified character.
- File encoding defaults to UTF8, however, there are many other types of file encoding available within the Connections dialog on the Entities tab.
Source Text File Example
Target Text File Example
Tip: Pre-existing Target Text files are not required, you can generate them automatically when the Map is run based on the information in the Connection dialog.
Related Topics
TIBCO Scribe® Online Text File as Source
Configuring Text File As Source Connection