Tutorials /

Starting Your First App with DataDirect

This tutorial is an introduction to help getting connected to data stores via DataDirect. You will create a DataDirect service within Kinvey and map it to a collection, which will enable you to access data from your data stores.

This tutorial assumes that you have

  1. A DataDirect account with a data source configured.
  2. A data store that is accessible via the DataDirect data source.

Creating a DataDirect Service

To allow access to data from your data store, you first need to create a Kinvey Service.

From Service Catalog, click Add a Service. Select DataDirect from the list of services.

Select DataDirect Service

Fill in the following details in the Service Creation page:

  • Name - Enter a name for the new service (e.g. myDataDirectService).
  • Description - optional description about the service.
  • Authentication - Enter your DataDirect username and password.

Click Save. Then, click on Add a Service Object .

Create DataDirect Service

Creating a Service Object

A Service Object is a generic term for data objects or records on a remote system that Kinvey can interact with - in this case DataDirect data source.

In the Service Object creation page, enter the following information:

  • Service object name - Enter a name for the new service object. This name is used by your mobile developer to reference the Endpoint within Kinvey. You can make the name match the Endpoint name, or provide a more user-friendly name. In the screenshot below, the Endpoint is 'Employees', but the Service Object name is 'people'.
  • Endpoint - The Endpoint is of the format /<datasourceName>/<entityInstance>
  • Primary key name and type - the name of the property that uniquely identifies the resource, and whether it’s a number (int) or string.
  • Supported Operations - Enable the operations you want to support for your collection.

Click on Save Service Object

Create Service Object

Discovering fields

Once the service object is created, click on it to discover source fields and add field mappings. Scroll to the bottom of the page and click on Discover Fieds. Here, you can select fields from your DataDirect data source that you want to expose in the Kinvey Collection and map them to Kinvey field names of your choice.

Discover Fields

Creating a Collection

After creating a service object, you must now create a collection and map it to the newly created service object. Click on Apps on the top left corner. Under Data, click on Collections. Click on Add a Collection and provide a name for your collection. For our example, we will choose the name people.

Once the collection is created, click on Choose a Data Service. Choose the service you created, and choose the service object from the dropdown menu.

Create Collection

This collection can now be accessed from your app and you can read/write data from the data store connected to the DataDirect data source.