This documentation is for WSO2 Data Services Server 3.2.0. View the home page of the latest release.

Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

CSV (comma separated text file) provides an easy way of storing simple tabular data. CSV files can be used to create datasources in the Data Services Server.

First, follow the steps in Creating Datasources. When you select CSV as the datasource type at the time a datasource 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: The row number that reading will be started.
  • Max. Rows to Read: Number of rows to read. If it is -1 the entire sheet will be read starting from the raw specified in "Start Reading From Row" field.
  • Contains Column Header Row: If this is true, the first row will be considered as the header. It is ignored and the data from the next row is taken. 

To write a query to this datasource, see Writing Data Service Queries.

Also, see a demonstration of service enabling a CSV file in CSV Sample.

  • No labels