Learn how to bulk import value and also dependency options for Datasets using a template.
When working with Datasets, you have the flexibility to bulk import options by either uploading an .xlsx template or using the copy-paste method.
The file import feature allows you to efficiently add and update both dataset and dependency options by importing an .xlsx file into a Dataset.
Understanding dataset options
In a dataset context, 'Options' can refer to:
- Dataset (value) options
These are the combination of friendly value and abbreviated value, if present. - Dependency options.
In dependencies, these are the (sub)set of dataset options that are also part of a dependency.
Note on dataset options
A dataset option typically consists of a (friendly) value and an abbreviation. When both are present, the abbreviation acts as a key, however, both value and abbreviation need to be unique to be valid.Example (click here)
Option 1
(Friendly) value: Germany
Abbreviation: de
Option 2
(Friendly) value: Denmark
Abbreviation: dk
These are two different options and both are valid because they have unique friendly values and abbreviations.
Implications for imports
Adding new options - Duplicate error
When adding new options, even if the abbreviations differ, using the same friendly value for multiple options is considered a duplicate error.Example (click here)
Option 1 (import file)
(Friendly) value: Germany
Abbreviation: de
Option 2 (import file)
(Friendly) value: Germany
Abbreviation: ger
This is a duplicate error due to conflicting friendly values. This could, for example, cause issues when importing records using the Accutics template in the Bulk create table.
Updating an existing value
You can update existing options by keeping the same abbreviations and changing the friendly values when importing. The system recognizes the option by its abbreviations and updates the friendly values accordingly.Example (click here)
Option (existing in Accutics)
(Friendly) value: Germany
Abbreviation: de
Option (import file)
(Friendly) value: Deutschland
Abbreviation: deThis will update the friendly value of the existing option from 'Germany' to 'Deutschland' without creating a new option.
Access to the feature
The import template feature can be accessed from various locations when working with a dataset:
- Datasets page: Locate a dataset > ... > 'Import'
- Dataset manager: From the 'Dataset options' section in the 'Dataset' tab > ... > 'Import'
- Input field (Project configuration): Add a select field > Add a dataset to the field > ... > 'Import dataset'
Note: For Shared datasets, the import feature is only accessible from the Shared datasets page under Account settings. This requires an Admin user role.
Import of value options
Instead of inputting or editing existing value options manually, you can import an .xlsx template instead.
Hence, click the meatballs menu (...) > Import
This opens a pop-up window to let you download and update a template:
- Download the template
The template is an .xlsx file comprising information about the division (account, division, workspace, project) and a section to be filled in.
- Fill in the template
Simply fill in the columns with the friendly value and abbreviations (if the use of abbreviations was set) to create new options.
Tips: Do not use the same abbreviation for two different unique values.
Use the same abbreviation as the existing option if you simply want to update it.
- Upload the template
You can either drag & drop or browse to choose a file. Wait till the file is uploaded > 'Review'
- Review the options
The review stage lets you manage the options you just uploaded. Warnings with a brief explanation will be displayed if the data cannot be accepted. In that case, adjust until all options are valid.
- Finalize the import
Notice that the new options have been added and/or existing ones have been updated.
Import of value and dependency options
It is also possible to upload an .xlsx file containing both value and dependency options. This allows you to add/update both simultaneously.
Hence, click the meatballs menu (...) > Import
This opens a pop-up window. Then:
- Include dependencies and download the template
To include dependencies, click ‘Include dependencies’ > (Select dependency variant) > 'Download template'
- Fill in the template
The template includes the dependencies that are part of the dependency variant you selected and two columns to set the value options. Refer to the below section 'Template' for instructions on how to use it.
- Upload the template
You can either drag & drop or browse to choose a file. Wait till the file is uploaded.
If the import was not successful, you will be prompted with an error. If the errors are known, you will be able to download a report of the issues. Please, refer to the below section 'Template errors'. Then, review and re-upload.
If the import was successful, check that the number of newly imported options is correct and continue to 'Review'.
- Review data
This review stage gives you an overview of all the value and dependency options that have been imported.
- Finalize the import
Depending on what you imported, notice that new options have been added, existing options have been updated, and dependencies have been updated too.
Template
The template is an .xlsx file divided into two parts:
- Account information
The first part contains information about the account, division, workspace, and project (rows 1 to 4).
Note: If you are importing to a Shared dataset, the division, workspace, and project fields are left undefined since Shared datasets are account-level fields.
- Field values (value options)
This part of the template is pre-filled with the independent datasets you selected to generate the template. Here, you can add the options of the dependent dataset and then, reorganize them to build dependencies.
Remember? A dependency lets you build a relationship where the value options of a dependent dataset A depend on the value option of another dataset B.
To build this relationship in the .xlsx file, you need to break down the value options by categories and subcategories. If you are familiar with pivot tables, you are essentially building nested rows.
- Create value option
Create all the value options you want to add/update under the 'Value' and 'Abbreviation' columns.
- Add row labels
For each value option, you need to add labels. Labels are used to group data together based on common values.
For example, if you want to build a simple dependency with one independent dataset, the outermost row labels correspond to the values of the independent dataset A and the innermost row labels correspond to the values of dataset B (which are nested within the values of dataset A).
You can also add multiple row labels to create a more complex hierarchy. Hence, the outermost row label is at the top of the hierarchy, and the innermost is at the bottom of it.
Example
Let’s consider a manufacturing company GloveMaster that produces gloves. GloveMaster owns two brands, each with their product categories and specific products. We want to set up datasets that reflect this hierarchy. Hence, where a product dataset depends on the product category and brand.
Brand 1: Frostbite
- Product Category: Winter Sport Gloves
- Products: Explorer Pro, Blizz Stormblock, Svalbard GTX
- Product Category: City Gloves
- Products: Urban Lite, City Touch, Fleece Heattech
Brand 2: Keepr Grip
- Product Category: Goalkeeping Gloves
- Products: Aqua Shield, Goaliedor Evolution, UltraGrip Elite
Instead of manually inputting all value options and setting the dependencies, we could build this relationship in an .xlsx file and import it.
Given that the 'Brand' and 'Product category' datasets already exist and that there is already a dependency set between the two, we want to import the options and set the dependencies for the 'Product' dataset from a template file.
Note: You can find the template of the example attached at the bottom of the article. It includes an empty state, completed, and examples of errors.
Datasets details (click here)
Name: Brand
Options:
- Frostbite
- Keepr Grip
Name: Product category
Options:
- Winter
- City
- Goalkeeping
Dependency:
- Winter and City (Product Category dataset) dependent on Frostbite (Brand dataset)
- Goalkeeping dependent on Keepr Grip
Name: Product
Options: none
Hence, click the meatball menu (...) of the 'Product' dataset > 'Import'
Then:
- Include dependencies and download the template
'Include dependencies' > Select 'Brand' and 'Product category' > 'Download template'
- Fill in the template
Initial template:
Completed template with new value options and row labels to build dependencies:
- Upload
- Review
- Finalize
Template errors
When uploading the completed template, the process may fail due to two main reasons:
Broken file
When an error occurs without a known cause, it is most likely that something is wrong with the file. Please, make sure that you did not edit the format of the file, alter the main structure of the content, or delete any IDs.
Invalid data
When issues with the template are known, it means that there are pieces of data that are invalid. Please, download the error report, correct your file where needed, and retry to upload it.
Here are some common errors:
- A value does not comply with dataset requirements
E.g., The dataset accepts only lowercase value options. The values in the file are uppercase.
- A row label is missing for dependencies
E.g., Brand: 'Brand1', Product category: '', Abbreviation: 'prod1'
The product category label is missing.
- Conflicting duplicate values
E.g.,
(Friendly) value: Germany
Abbreviation: de
(Friendly) value: Denmark
Abbreviation: de
The abbreviations, used as the key, are the same but the friendly values are not.