CSV (Comma separated Text file) provides an easy way of storing simple tabular data. The sample csv file used in this example is hosted by USGS, the science organization which hosts latest earthquake information in CSV files online.
...
4. The Data Sources page appears. Click on the Add New Data Source link and add your Data Source details. Select the data source type as CSV.
Then click Save.
For example,
Info |
---|
Note: |
...
- Single Character = "X" (X is any character), e.g. ","
- Tab = "\t"
- Space = "\s"
- Any Unicode Character = "\uXXXX" (XXXX is the hexadecimal unicode value)5. After saving, the
6. Click Save. The added data source page appears. You can edit or delete the Data Source. To proceed click "Next."
67. The "Queries " page appears.
Initially your service does not include any queries. Click on 'Add New Query' to add a new query, input/output mappings, events etc. to your Data Service. Enter query details using which values will be extracted. Specify how the SQL response is mapped to output XML.
Example 1:
Query ID : customersInBostonSQL
SQL Statement : select *, from Customers where city = 'Boston' and country ='USA'
Example 2:
Query ID : customerAddressSQL
SQL Statement : select *, from Customers where contactLastName = ? and contactFirstName = ?
The following query needs two parameters for execution. The Input Mapping section is used to specify these input parameters.
7according to the structure of the response you want.
In the following example, we have used Grouped By Element, Row Name and Row namespace.
8. Once a new query is added, it will be listed as follows:
You have added one query to your data service configuration.
You can edit or delete your query. To continue, click " Next."
8. The " Operations " page appears. Click the " Add new operation " link to create an operation. Select a query to be executed when this operation is called.
Click "Save " once done. For example,
9. The operation will be listed in the " operations " page. You can edit or delete your operation. To continue click " Next."
10. The "Resources" page appears. Click "Add new resource" and give your resource details. Click "Save" once done. For example,
...