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
- A DataDirect account with a data source configured.
- A data store that is accessible via the DataDirect data source.
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.
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 .
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
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
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.
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.
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.