Question

I am working on wso2 DSS 3.1.0 and inserting data as array into sql , this is Sql query

INSERT INTO memployeecount (CompanyCode,NoofEmployees) VALUES
   ('SPS', 1000),
   ('SPS', 2000),
   ('SPS', 3000),
   ('SFS', 500),
   ('SFS', 600),
   ('SFS', 700);

it's working fine,

But how can i write the same query for Data Service server.

Some one guide me.

Était-ce utile?

La solution

WSO2 DSS supports batch requests, which takes of array of parameters as the input. What you need to do is create a dataservice enabling batch requests[1], with a simple insert query. Once it is deployed there will be a batch enabled request created from which you can insert multiple records. For more information you can tryout Batch Processing sample available inside DSS[2].

[1]http://docs.wso2.org/display/DSS310/Creating+Using+Various+Data+Sources

[2]http://docs.wso2.org/display/DSS310/Batch+Processing+Sample

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top