WSO2 Data Services Server : Tips

Dilshani Subasinghe
Feb 3, 2017 · 1 min read
Image for post
Image for post

As a new user of WSO2 Data Services Server, I learned some important points that is useful when you are playing with data services.

  • When you are going to map inputs for query with parameters (Ex: parameter), you have to have space before that and space after that one.

Ex:

where EmploymentType = :EmploymentType and

  • You can only use only one query while adding query to Data Service. You may add semicolon for parameters within the query and it will be identify as a separate query by DSS.

Ex: Dont use as follows:

SET @RequiredDatedate:= :RequiredDatedate ; SELECT SUM(CASE WHEN (DATEDIFF(@RequiredDatedate,StartDate)

Note: If u are going to set parameters like above, you can replace exact places with parameter values. And remember to have spaces as mentioned in first bullet.

SELECT SUM(CASE WHEN (DATEDIFF( :RequiredDatedate ,StartDate)

  • Do not keep unnecessary spaces within query. Try to minimize each and every unnecessary spaces.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store