Use the Unicode Text Adapter to read from or write to a text file. Text files can be used as either a source or a target.
Text File As A Source
This is an example of using the TIBCO Scribe® Insight Unicode Text Adapter to read a .csv source file. The .csv source file was created using an Excel spreadsheet saved as a .csv file.
Excel Spreadsheet To CSV File
Configuring Source Text Connection
- In the TIBCO Scribe® Insight Workbench, click View > Connections.
- In the Connection Manager click New.
- Select Adapters > Unicode Text.
- Click OK.
- On the Configure Adapter dialog, browse to the folder containing the CSV file and select the appropriate file.
- Click Configure File Layout to specify Field Types. The file name, table name, and field definitions are stored in ScribeText.cfg.
- Select Comma in the File Type field. In this example the File Type is Comma because you are working with a CSV file.
- Use the Field Configuration tab to set the Data Type for each field in the CSV.
- Click OK when all fields have been configured.
- Click OK on all of the dialogs until you return to the Workbench.
- Click Configure Source.
- Select the Adapter for Unicode Text connection.
- Under All Data Objects select your CSV file and click OK.
Now you can see the field names in the Source panel on the Workbench. You can return to
View > Connections to open the Connection Manager and edit the connection configuration if necessary.
Text File As A Target
Using the Unicode Text Adapter you can write data to a CSV file for processing by another system.
Configuring Target Text Connection
- Create a Text/CSV file with the Column headings to represent each field in the records you want to write to the file.
- In the TIBCO Scribe® Insight Workbench, click View > Connections.
- In the Connection Manager click New.
- Select Adapters > Unicode Text.
- Click OK.
- On the Configure Adapter dialog, browse to the folder containing the target CSV file with the column headers and select the appropriate file.
- Click Configure File Layout to specify Field Types.
- Indicate that the column names are in the first row.
- Specify the column size for each column in the file.
- Save the configuration.
- Add the connection to the DTS.
- Map the fields to the target text file.
- Click Run > Run Job to run the DTS.
- Review the data in the target CSV file.
For additional information, see the following in the TIBCO Scribe® Insight Help:
Working With Unicode Data,
Configuring A Text Connection