Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If the spread sheet is Private, you will be prompted to enter the user name and the password. For example,


 

4. 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 according to the structure of the response you want.

Currently, the Query Mode supports only basic SELECT, INSERT, UPDATE and DELETE queries. Nested queries are not supported at the moment but will be facilitated in an upcoming release. For more information, refer to supported queries.


5. Once done, click "Next" to add operations.

6. Click on "Add Operation", and enter a name to the operation. Select the created query from the drop down list and click on "Add Query Params as Operation Params" to add the parameters to operation. Now save the operation. For example,

 

Queries Supported in the 'Query' Mode
Anchor
supQ
supQ

Currently, only basic SELECT, INSERT, UPDATE and DELETE queries are supported by the 'Query' mode. Shown below are few example queries.

 

Sample 1:

 

Code Block
SELECT customerNumber, customerName, phone, state, country
FROM customers

 

Image Added

 

Sample 2:

 

Code Block
INSERT INTO customers (customerNumber, customerName, contactLastName)

VALUES(?,?,?)

 

Image Added

 

Sample 3:

 

Code Block
UPDATE customers
SET contactFirstName=?, contactLastName=?
WHERE customerNumber=?

 

Image Added

 

Sample 4:

 

Code Block
DELETE FROM customers
WHERE customerNumber=?

 

Image Added

 

You can also create new sheets in the Excel or drop existing sheets.

 

Sample 5:

 

Code Block
CREATE SHEET ProductCategories (ProductCode, Category)

 

Image Added

 

Sample 6:

 

Code Block
DROP SHEET ProductCategories

 

Image Added

 

Excerpt
hiddentrue

Instructions to create a data source from a Google spread sheet in WSO2 products.