This documentation is for WSO2 Data Services Server 3.2.2. View documentation for the latest release.
CSV - Data Services Server 3.2.2 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

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.

You can create the CSV datasource as you create your data service: Follow the steps from 1 to 3 in creating a data service using various data sources. When you get to the Add New Data Source screen, select CSV as the datasource type. The CSV-specific options will now be available for editing as shown below. 

  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