Creating a flat file data source
When creating a flat file data source in BIRT, you specify its property values, such as the file location and the character set that the text file uses. You should also know how the text file is structured—whether the file uses commas, semicolons, tabs, or pipes to separate values, and whether the file specifies column names or data types.
How to specify the connection information for accessing a text file
1 In Data Explorer, right-click Data Sources, then choose New Data Source.
2 In New Data Source, supply the following information:
1 Select Flat File Data Source from the list of data source types.
2 In Data Source Name, type a name for the data source.
3 Choose Next. New Flat File Data Source Profile appears, as shown in Figure 7‑6.
Figure 7‑6 Selecting flat file directory and character set
3 Specify the following connection information for the text file:
1 In Select folder, type the location of the folder, or choose Browse to navigate to and select the folder.
2 In Select charset, select the character set that the text files in this folder use.
3 In Select flatfile style, select either CSV, SSV, PSV, or TSV for a file that uses comma-separated values, semicolon-separated values, pipe-separated values, or tab-separated values, respectively.
4 If the first line of the text file specifies the column names, select the following option:
Use first line as column name indicator
5 If the second line of the text file specifies the column data types, select the following option:
Use second line as data type indicator
4 Choose Finish. The new flat file data source appears under Data Sources in Data Explorer.