CSV (comma separated text file) provides an easy way of storing simple tabular data. CSV files can be used to create data sources in the Data Services Server.
First, follow the steps in Creating Data Sources. When you select CSV as the data source type at the time a data source is created, the CSV-specific options appear. For example:
The fields in the above page are as follows:
- CSV File Location: The sample csv file used in the above example is hosted by USGS, the science organization that hosts latest earthquake information in CSV files online. We use a sample file hosted online but you can also use one in your local machine.
- Column separator values:
- Single Character = "X" (X is any character), e.g. ","
- Tab = "\t"
- Space = "\s"
- Any Unicode Character = "\uXXXX" (XXXX is the hexadecimal unicode value)
- Start Reading From Row: <what happens if this value is negative or 0 or a row that doesn't exist?>
- Max. Rows to Read: <what happens if this value is negative or a row that doesn't exist?>
- Contains Column Header Row: <what does this mean?>
To write a query to this data source, see Writing Data Service Queries.
Also, see a demonstration of service enabling a CSV file in CSV Sample.