Skip to content

Data store

Data stores allow you to store data from scenario or transfer data between individual scenarios or scenario runs. You can use data stores to store data from apps during scenario execution. Data stores are similar to a simple database.

The data store app's modules allow you to add, replace, update, retrieve, delete, search, or count records in your Ibexa Connect data store.

You can view and manage your data stores and the data they contain in the data stores section of Ibexa Connect.

Note

The various examples of use can be found here.

Getting started with data stores

Prerequisites

  • A data store created

In order to use the data store modules, it is necessary to create a data store in your Ibexa Connect account.

Caution

The module dialog fields that are displayed in bold (in the Ibexa Connect scenario, not in this documentation article) are mandatory!

Creating a data store in Ibexa Connect

  1. Click Data stores in the left menu.

    data_store_1.png

  2. Click Add data store.

  3. Enter settings for the new data store.

Data store name

Enter the name for the data store. E.g. Contacts

Data Structure

A data structure, is a list of the columns for a table, that indicates the column name and data type.

You have three options:

  • Select the data structure that has been already created

  • Leave the field empty

    If you don't select a data structure, the database will only contain the primary key. Such a database type is useful if you only want to save keys and are only interested in knowing whether or not a specific key exists in the database.

  • Add a new data structure

    Click the Add button to create a new data structure.

Please see the Setting Up the Data Structure section of this article.

Data storage size in MB

Allocate the size for the data store from your total Internal data storage.

Note

The reserved amount can be changed at any time later on.

The total internal data storage capacity depends on the plan you have purchased.

Setting up the data structure

To set up the data structure, open the Add data structure dialog.

data_store_2.png

You can access this dialog by clicking the Add button when creating or editing the data store:

data_store_3.png

Data structure name

Enter the name for the data structure you are going to create.

Specification

There are two options for how you can specify the data store columns.

  • Click the Add item button to specify the properties of one column manually.

    Enter the Name and Type for the data store column and define corresponding properties.

  • Use the Generator button to determine the columns from the sample data you provide.

    For example, the following JSON sample data:

1
2
3
4
5
6
7
8
{
    "name":"John",
    "age":30,
    "phone number": {
    "mobile":"987654321",
    "landline":"123456789"
    }
    }

creates three columns (name, age, phone number) with phone number as a collection of mobile and landline.

The empty columns in the data store view:

data_store_8.png

You can then add values to the data store manually or using the Ibexa Connect data store modules.

Strict

If enabled, the data structure will be compared to the structure of the payload and if the payload contains extra items not specified in the data structure, the payload will be rejected.

Actions

Add/Replace a Record

Adds or replaces a record in the data store.

Caution

The module throws an error when you try to add the record which is already in the data store under the same name and the Overwrite an existing record option is disabled.

Data store

Select or add the data store where you want to create a record.

Key

Enter the unique key. The key can be used later to retrieve the record. If you leave this field blank, the key will be generated.

Overwrite an existing record

Enable this option to overwrite the record. The record you want to overwrite must be specified in the Key field above.

Record

Enter the desired values to the record's fields.

Caution

The maximum size of the record in data store is 15 MB!

Update a Record

Updates a record in the selected data store.

Data store

Select or add the data store where you want to create a record.

Key

Enter the unique key of the record you want to update.

Insert missing record

Enable this option to create a new record if the record with the specified key doesn't already exist.

Record

Enter the desired values to the record's fields that you want to update.

Caution

The maximum size of the record in data store is 15 MB!

Get a Record

Retrieves a record from the selected data store.

Data store Select the data store you want to retrieve a record from.
Key Enter the unique key of the record you want to retrieve.

Check the Existence Of a Record

Returns the value true if the record exists in the specified data store or false if the record doesn't exist in the data store.

Data store Select the data store you want to check for the record existence.
Key Enter the key of the record you want to check for existence

Delete a Record

Deletes a specified record from the selected data store.

Data store Select the data store you want to check for the record existence.
Key Enter the key of the record you want to delete.

Delete All Records

Deletes all records from the selected data store.

Data store Select the data store you want to delete all records from.

Search Records

Performs a search for records based on filter settings.

Data store

Select the data store you want to check for the record's existence.

Filter

Set the filter for the search.

Select the column, operator and required value (search term) for the search.

Sort

Key Select the column name you want to sort the results by.
Order Select whether you want to sort results in the ascending or descending order.

Limit

Set the maximum number of search results Ibexa Connect will return during one execution cycle.

Continue the execution of the route even if the module returns no results

If enabled, the scenario will not be stopped by this module.

Count Records

Returns the number of records in the selected data store.

Data store Select the data store whose records you want to count.

Managing records in data stores

Ibexa Connect allows you to view, update, and delete the records in your data store.

To manage records in your data store, click Data stores in the left menu, then click Browse next to your data store.

data_store_4.png

This shows the editing interface for data store records.

data_store_5.png

Adding and editing records

Click Add to add new records to the data store. You can add multiple records by clicking Add multiple times. Newly inserted records are highlighted in green.

Click an existing field to change it. Changed records are highlighted in yellow.

data_store_6.png

Click Save to save all your changes to the data store. Click Discard changes to throw away any changes you have made, including added records and edited records.

Note

You cannot use Discard changes to get back records that you have deleted.

Deleting records

To delete records from your data store, first select the records you want to delete by selecting the check boxes next to the records. Then, click the Delete icon.

data_store_7.png

Note

You cannot roll back deleted records.

Troubleshooting

Restoring lost data from your data store

At the current moment of writing this, there is no tool which can automate this, making it difficult to obtain lost data. However, the long method of recovering data in your data store is to go through all execution logs of scenarios where items were inserted to the data store, then get data manually and insert them again.

Out of space error

The reason you are getting a message that states that you are out of space is because you currently have a datastore that has already been assigned your allocated datastore storage.

Please edit any of your existing data stores to free up space.

  1. Click Edit.

  2. Reduce the data storage size.

    data_store_9.png

You can now add a new data store.

Caution

Make sure that while creating a new data store you do not assign all of your space to only one record unless you need it.