Skip to main 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 Make data store.

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

Note

The various examples of use can be found here.

Creating a data store in Make

  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.

Managing data structure of a data store

Setting up the data structure

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

Data_structure_window.png

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

Data_structure_add.png

Data structure name

Enter the name for the data structure.

The data structure name is its unique identifier and cannot be changed later.

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 the corresponding properties.

    Note

    Enabling the Advanced settings reveals the Label setting for every data structure item.

    Consider defining a label for every item in the data structure of your data store in order to avoid challenges when renaming data store columns.

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

    For example, the following JSON sample data:

    {
    
     "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 Make 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.

Updating the data structure of a data store

Important

Take good care when updating the data structure of a data store. Before updating the structure make a backup of the data in the data store.

Changes in the data structure of a data store might lead to unexpected results. If you experience unexpected behavior check out the Troubleshooting section.

When you want to update the data structure of a data store, you should keep in mind that:

  • The data structure field names are unique identifiers of the data store columns. When you rename a field of a data structure, Make cannot retrieve the original data in the data store column, because they use a different column identifier.

  • You can update the data structure field label anytime without the effects mentioned in the previous point.

  • The changes to the data store structure apply only to the new data you put in the data store. Make doesn't change or validate the original data to fit the updated structure.

The best approach to updating the data structure of a data store is to create temporary fields with copies of your data. Update the data in the temporary fields and make sure they conform to the final data structure.

Example data store:

In the data store with 4 columns:

  • Key: type number

  • productId: type number

  • productName: type text

  • dateAdded: type date

example-data-store.png
example-data-store-structure.png

Renaming a field of the data store structure

You can update the Label of a data store structure field anytime.

If you want to change the data store structure field Name, follow the steps:

  1. Create a backup of data in the data store.

  2. Create a field in your data store with the new name.

  3. Copy all data from the original column to the new column.

  4. Update all data in the original column to empty fields. This step prevents storing the data in the original column alongside the data in the new column.

You have put the data from the original data store column into the new data store column. In addition, you have a data store backup to check that the update was successful.

Changing the type of a field of the data store structure

  1. Create a backup of data in the data store.

  2. Either create a temporary field for the updated data type, or you can skip this step and update the field type in place.

  3. Use a conversion function to update the type of all values in the data store column to the new type. For example, to convert text to date, use the parseDate function.

You have updated the type of the data store column. You have converted all data in the data store column to the new data type.

Actions

Adds or replaces a record in the data store.

Warning

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 the data store is 15 MB!

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 the data store is 15 MB!

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.

Return Wrapped Output

Choose if you want the output to be returned in the same way that the Search records module returns data.

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

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.

Deletes all records from the selected data store.

Data store

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

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.

Tip

If you use the datetime operators, you need to provide a value in a date format. Use the parseDate function for this purpose.

Sort

Key

Select the column name you want to sort the results by.

Order

Select whether you want to sort results in ascending or descending order.

Limit

Set the maximum number of search results Make 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.

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

Make 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

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.

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.

When you want to make large-scale changes in your data store, like deleting a high number of records or changing the data store structure, you should make a backup of your data first.

There are two options of how to backup the data in your data store with Make:

In the following steps, we will focus on backing up your data with a Make scenario:

  1. Clone the data structure of the original data store. Name the data structure to clearly show that it's for the backup data store.

  2. Create a data store with the backup data structure. Name the data store to clearly show that it's a backup of your data.

  3. Create a Make scenario. Name the scenario to clearly show that it's for backing up data in the data store.

  4. Add the Data Store > Search Records module to the scenario. In the Data Store field, select the data store which contains the data you want to back up.

  5. Add the Data Store > Add/Replace Record module to the scenario.

    1. In the Data Store field, select the data store to which you want to back up your data.

    2. Map all fields from the first module to the second module, including the Key field.

  6. Run the scenario.

The backup data store now contains all data from the original data store.

Note

You can reduce the number of operations by using the Text Aggregator and CSV or SQL-processing tools and apps.

Troubleshooting

There is no automated process to restore lost values in your data stores. However, there is a manual approach that you can use to fix the issue.

To locate and restore the missing data, follow these steps:

  1. Open the specific scenario where the missing items were stored.

  2. Review the execution history and identify the instances where items were inserted into the data store.

  3. Copy the identified missing data into your data store.

Caution

Before updating the data structure of a data store, make a backup of your data.

There are two challenges that occur when you update the data structure of a data store:

  • When you rename a field of the data structure, the data in the field becomes inaccessible.

  • When you change the type of a field in a data structure, the original data keeps the original data type and the new data has the new type.

Renaming a field in the data store structure

When you rename a field in the structure of a data store, the data in the data store becomes inaccessible.

Before the data structure field update:

example-data-store-step1.png
example-data-structure-step1.png

After the data structure field update:

example-data-store-step2.png
example-data-structure-step2.png

If you want to access the data again, add a field to the data store structure with the original field name:

example-data-store-step3.png
example-data-structure-step3.png

With the data in the original field accessible again, you can follow the steps to update the data store structure.

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.