Administration Guide
Configuring Access to Delimited Files
This chapter describes how to configure access to delimited files in Liquid Data. Delimited files are typically exported from a database, spreadsheet, or an application like a spreadsheet. A common format for delimited files is a comma separated values (CSV) file. This chapter contains the following sections:
Using Delimited Files in Liquid Data
Delimited files are text files that contain a pre-defined character as a data separator. You can create data sources in Liquid Data that access these files for use in queries. You can then combine this data with any other data sources by creating queries that use the delimited file data source.
Creating Delimited Files From an Application
You can create delimited file with any pre-defined character as a data separator. Many applications, including database and spreadsheet applications, provide built in features to generate comma separated value (CSV) files. You can then use the CSV files (or files with any separator character) as data files to query against with Liquid Data.
Typically, you can use the Save As feature in a database or spreadsheet application (Microsoft Excel, for example) to save a file as a delimited or CSV file.
Delimited File Configuration Field Descriptions
The following table describes the fields in the Configure Delimited Files Data Source Description screen of the Liquid Data Administration Console.
Table 9-1 Delimited File Configuration Fields
Field
|
Description
|
Name
|
The name of the Delimited File data source in the repository.
|
Data File
|
Name of a delimited data file in the repository. Enter the delimited file name or click Browse Repository to select it.
|
Schema
|
Optional. Identifies the name of the schema associated with the delimited file. You can find the .xsd file in the LDrepository/schema folder.
Either enter the schema file name or click Browse Repository to browse the schema folder.
|
Separator
|
The character used to separate the fields in a delimited file. The default is a comma character (,).
|
Remove Quotes
|
Specifies if the quotation marks (") in the data file are removed when the data is read. Check this box unless you want the quotation marks to display as part of the data.
|
Has Header
|
Specifies if the delimited data file has a header row. When this box is checked, the first row is treated as a header row and not a data row. If there is no schema file, then the values in the header row are used for the schema elements of the Delimited File Data Source.
|
Dynamic Data Source
|
Check this box if the data source is to be supplied at query runtime. If it is checked, you must specify a second parameter for the xf:document function in the XQuery with a file name. The name has the same rules as those stated for the data file.
|
Configuring Delimited Files
Perform the following steps to configure a delimited file data source description.
- In the left pane of the Administration Console, expand the node for your domain and click the Liquid Data node.
- In the right pane, click the Data Sources tab in the Liquid Data Administration console.
- In the right pane, navigate to the Delimited Files tab (below the Data Sources tab).
- Click the Configure a New Delimited File Data Source Description link (or to modify an existing one, click the name of the data source).