Explore more
Data stores
Data stores
19min
data stores allow you to store data from a {{scenario singular lowercase}} or transfer data between individual {{scenario plural lowercase}} or {{scenario singular lowercase}} runs you can use data stores to store data from apps during {{scenario singular lowercase}} execution data stores are similar to a simple database data storage allowance before creating a data store, take note of your data storage allowance total data storage is based on number of operations in your plan, with every 1,000 operations equaling 1 mb of data storage as 1 mb is the minimum size of a data store in {{product name}} , you will need at least 1 mb of data storage available to create a new data store consider the following data storage allowances for data stores, depending on your plan as a free plan user, you are entitled to 1 mb of data storage, equaling 1 data store, as the plan includes 1,000 operations per month as a paid user, calculate your total data storage by dividing your monthly operations by 1,000 for example, with 20,000 operations, you have 20 mb of data storage (=20,000/1,000) available to allocate to your data stores each data store is at least 1 mb in size note that a single organization, regardless of plan type, can have a maximum of 1,000 data stores to adjust the data storage allocated to your existing data stores, see data stores docid\ l6dub0qnrcbjbvnhw6 xk how to create a data store in the left sidebar, click data stores click + add data store add data store enter settings for the new data store field description data store name enter the name for the data store for example, 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 a 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 data storage size in mb allocate the size for the data store from your total data storage the amount can be changed at any time 1 mb is the minimum data storage size per data store you can see your available storage space in the text below the data storage size in mb field manage the data structure of a data store add a new data structure during the process of setting up a data store, you can set up a new data structure to set up the data structure while adding a data store, click the add button for the data structure field you can access this dialog by clicking the add button when creating or editing the data store 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 use the generator button to determine the columns from the sample data you provide for example, the following json sample data creates three columns (name, age, phone number) with phone number as a collection of mobile and landline { "name" "john", "age" 30, "phone number" { "mobile" "987654321", "landline" "123456789" } } 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 update the data structure of a data store be careful when updating the data structure of a data store before updating the structure, make a backup of the data changes in the data structure of a data store might lead to unexpected results 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, {{product name}} 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 {{product name}} 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 rename a field of the data store structure you can update the label of a data store structure field anytime to change the data store structure field name data stores docid\ l6dub0qnrcbjbvnhw6 xk create a field in your data store with the new name copy all data from the oroginal column to the new column 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 change the type of a field of the data store structure data stores docid\ l6dub0qnrcbjbvnhw6 xk either create a temporary field for the updated data type, or you can skip this step and update the field type in place 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 actions add/replace a record adds or replaces a record in the data store field description 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 the maximum size of the record in the data store is 15 mb 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 update a record updates a record in the selected data store field description 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 the maximum size of the record in the data store is 15 mb get a record retrieves a record from the selected data store field description 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 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 field description 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 field description 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 field description data store select the data store you want to delete all records from search records performs a search for records based on filter settings field description 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 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 {{product name}} will return during one execution cycle continue the execution of the route even if the module returns no results if enabled, the {{scenario singular lowercase}} will not be stopped by this module count records returns the number of records in the selected data store field description data store select the data store whose records you want to count manage records in a data store {{product name}} allows you to view, update, and delete the records in your data store in the left sidebar, click data stores click browse next to your data store browse data stores add or edit records click add to add new records to the data store you can add multiople records by clicking add multiople times newly inserted records are highlighted in green click an existing field to change it changed records are highlighted in yellow add or edit records 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 you cannot use discard changes to get back records that you have deleted delete 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 you cannot roll back deleted records delete records back up data in the data store 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 create a {{product name}} {{scenario singular lowercase}} use the make api to back up your data using a {{product name}} {{scenario singular lowercase}} clone the data structure of the original data store name the data structure to clearly show that it's for the backup data store create a data store with the backup data structure name the data store to clearly show that it's a backup of your data create a {{product name}} {{scenario singular lowercase}} name the {{scenario singular lowercase}} to clearly show that it's for backing up data in the data store add the data store > search records module to the {{scenario singular lowercase}} in the data store field, select the data store which contains the data you want to back up add the data store > add/replace record module to the {{scenario singular lowercase}} run the {{scenario singular lowercase}} the backup data store now contains all data from the original data store you can reduce the number of operations by using the text aggregator and csv or sql processing tools and apps troubleshooting restore lost data from your data store 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 open the specific scenario where the missing items were stored review the execution history and identify the instances where items were inserted into the data store copy the identified missing data into your data store update the data store structure 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 if you want to access the data again, add a field to the data store structure with the original field name with the data in the original field accessible again, you can follow the steps to data stores docid\ l6dub0qnrcbjbvnhw6 xk 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 before updating the data structure of a data store, data stores docid\ l6dub0qnrcbjbvnhw6 xk out of space error you get this error message if you currently have a datastore that has already been assigned your allocated datastore storage you can edit any of your existing data stores to free up space in the left sidebar, click data stores click edit next to a data store edit a data store reduce the data storage size in the data storage size in mb field you can now add a new data store make sure that when you create a new data store you do not assign all of your space to only one record unless you need it date/time displayed as date for text value when you input a raw date/time string in iso format ending with z in a text based field of a data store, it will display in a parsed (date) format add date and time functions docid 1kv1ib5q50i0slbc7g2pz to convert a date in raw iso format to text in the data structures docid\ h nm0pyg893ubigte m c of your data store, set the type of the relevant field to text in the relevant scenario, add a data store > add/replace a record module in its configuration settings, locate the field that corresponds to the relevant column in the data store add the formatdate() and tostring() functions as shown below, with the raw iso date as the first input value for more on formatting date and time data, see tokens for date/time formatting docid\ kumukvbfixzztkuzye7xz click save