Skip to content

Creating a Data Service


Creating the datasource connection

Follow the steps given below to create the data service file:

  1. Select the already created Data Service Project in the project navigator, right click and go to New -> Data Service.
    The New Data Service window will open as shown below.

  2. To start creating a data service from scratch, select Create New Data Service and click Next.

  3. Enter a name for the data service.
  4. Click Next and start adding the datasource connection details.
  5. Save the data service.

A data service file (DBS file) will now be created in your data service project. Shown below is the project directory.

Creating a query

  1. Select the data service you created in the previous step.
  2. Right-click and click Add Query.
  3. Enter the query details.
  4. Save the query. The query element is now added to the data service:

Add an SQL

  1. Right-click the query and click Add SQL to add the statement.
  2. Save the SQL statement.

Add Input mapping

  1. Right-click the query again and click Add Input Mapping.
  2. Enter the input mapping details.
  3. Save the input mapping.

Add Output mapping

  1. Right-click the query again and click Add Output Mapping.
  2. Enter the following value to group the output mapping:
  3. Save the output mapping.

Add Output mapping element

  1. Right-click the output mapping and go to Add Output Mapping → Add Element to create an element.
  2. Enter the following element details.
  3. Save the element.
  4. Save the output elements.

The data service should now have the query element added as shown below.

Creating a resource to invoke the query

Now, let's create a REST resource that can be used to invoke the query.

  1. Right-click the data service and click Add Resource. Add the following resource details.
  2. Expand the GET resource, and click the GetEmployeeDetails (call-query). Connect the query to the resource by adding the following:
  3. Save the resource.

The data service should now have the resource added as shown below.



  • See the tutorial on data integration
  • Top