6.3.2 Modifying Text Source Meta-Data
If you do not wish to use the 'Import' function to automatically load the meta-data from the file (or if the file does not contain header information), you can define the data columns manually. Follow the steps below:
1. Click 'Append Column' in the bottom panel to add a column to the table specification.
2. In the 'Alias' field for the new column, enter the desired column header text.

3. In the 'Type' menu, select the desired data type for the column.
4. In the 'Format' field, select the desired format for the column. The format specifications are the same as those for the XML data source. See Defining an XML Data Source for more details.
5. Repeat the above steps to add additional column specifications. (To add a new column to the left of an existing column, use the 'Insert Column' button.)

6. Click the 'Save' button in the Style Studio toolbar to save the data source.
The example below illustrates how to specify multiple columns.
In this example, you will create a Text data source using a sample text file in the examples/docExamples/datasource/xml directory. Follow the steps below:
1. Click the 'New' button in the Style Studio toolbar. This opens the 'New Asset' dialog box.
2. In the left panel, select the 'Data Source' node. In the right 'Types' panel, select 'Text', and click 'OK'. This opens the 'Text Data Source Wizard'.
3. Select the General tab. In the 'Name' field, enter the data source name. For this example, enter “Text”.
4. Select the Source tab. Click the 'Browse' button next to the 'URL or File' field, and select the following text file:
{StyleIntelligence}\examples\docExamples\datasource\xml\customers.txt
Because this is a static text file, no parameters are needed.
5. Click 'Next' twice, and then click 'Finish' to close the Wizard. Style Studio displays the completed Text data source.
6. Select the Output tab.

7. In the 'File type' menu, select 'Delimited Text'.
8. Deselect 'First row header', because the customers.txt file does not include a header row.
9. For the Body 'Delimiter', use the default comma delimiter.
For files with a header row, use the 'Import' feature to help define columns. See Defining a Text Data Source.
10. Click 'Append Column' to add a column to the table specification.
11. In the 'Alias' field for the new column, type “Customer Number ”.
12. Repeat the two previous steps to add the rest of the columns in the customers.txt file: “Name”, Company”, “Address”, “City”, “State”, “Zip”, and “Reseller”.

13. To set a column's data type, click in the correspoding 'Type' field, and make a selection. In this example, change the 'Reseller' column type to 'boolean'.


14. Click the 'Save' button in the Style Studio toolbar to save the data source.
| << 6.3.1 Defining a Text Data Source | © 1996-2013 InetSoft Technology Corporation (v11.5) | 6.4 Java Object Data Source >> |