TIBCO Scribe® Insight Unicode Text Adapter

TIBCO Scribe® Insight Unicode Text Adapter

book

Article ID: KB0078640

calendar_today

Updated On:

Products Versions
TIBCO Scribe Insight 7.9.1

Description

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.
 
kA2320000004Gm9CAE_en_US_1_0
Excel Spreadsheet To CSV File


Configuring Source Text Connection

  1. In the TIBCO Scribe® Insight Workbench, click View > Connections.
  2. In the Connection Manager click New.
  3. Select Adapters > Unicode Text.
  4. Click OK.
 
kA2320000004Gm9CAE_en_US_1_1
 
  1. On the Configure Adapter dialog, browse to the folder containing the CSV file and select the appropriate file.
 
kA2320000004Gm9CAE_en_US_1_2
 
  1. Click Configure File Layout to specify Field Types. The file name, table name, and field definitions are stored in ScribeText.cfg.
 
kA2320000004Gm9CAE_en_US_1_3
 
  1. Select Comma in the File Type field. In this example the File Type is Comma because you are working with a CSV file.
  2. Use the Field Configuration tab to set the Data Type for each field in the CSV.
  3. Click OK when all fields have been configured.
  4. Click OK on all of the dialogs until you return to the Workbench.
  5. Click Configure Source.
  6. Select the Adapter for Unicode Text connection.
  7. Under All Data Objects select your CSV file and click OK.
 
kA2320000004Gm9CAE_en_US_1_4

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
 

  1. Create a Text/CSV file with the Column headings to represent each field in the records you want to write to the file.
 
kA2320000004Gm9CAE_en_US_1_5
 
  1. In the TIBCO Scribe® Insight Workbench, click View > Connections.
  2. In the Connection Manager click New.
  3. Select Adapters > Unicode Text.
  4. Click OK.
  5. On the Configure Adapter dialog, browse to the folder containing the target CSV file with the column headers and select the appropriate file.
  6. Click Configure File Layout to specify Field Types.
 
kA2320000004Gm9CAE_en_US_1_6
 
  1. Indicate that the column names are in the first row.
 
kA2320000004Gm9CAE_en_US_1_7
 
  1. Specify the column size for each column in the file.
 
kA2320000004Gm9CAE_en_US_1_8
 
  1. Save the configuration.
  2. Add the connection to the DTS.
 
kA2320000004Gm9CAE_en_US_1_9
 
  1. Map the fields to the target text file.
 
kA2320000004Gm9CAE_en_US_1_10
 
  1. Click Run > Run Job to run the DTS.
  2. Review the data in the target CSV file.
 
kA2320000004Gm9CAE_en_US_1_11

For additional information, see the following in the TIBCO Scribe® Insight Help: Working With Unicode Data, Configuring A Text Connection  

Issue/Introduction

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.