The following file formats are supported for manual import in BellaDati:
- CSV (plain text files)
- Microsoft Excel (XLS, XLSX) - Office 2003 - 2016 (previous versions not guaranteed)
- XML files
- ZIP files (containing one or more supported file formats above)
- JSON files
To import file:
- Go to the Data Set page
- Select Import data
- Choose Data file in Inport type
- Select appropriate Data file format
Importing from CSV
When you are importing from CSV, please continue directly to Import settings page.
Importing from Microsoft Excel
After uploading XLS/XLSX file you will be prompted to select the desired spreadsheet list.
Importing from XML
In the XML importing guide, you will be prompted to select the row tag, which represents repeatable data sentence. The following example illustrates it on XML file containing employees:
In this case, the row tag is
- Row tag: Select repeating tag in XML structure. Check extracted content in the preview on the left.
- Optionally, you can add custom columns repeatedly: Select items and/or attributes when XML structure is not straightforward.
Importing from ZIP
Importing data compressed as ZIP archive represents an effective way how to reduce imported file size and also upload times significantly. It can contain the following file formats:
- Plain text (CSV)
- Microsoft Excel (XLS, XLSX)
Please follow corresponding chapters above to continue importing Microsoft Excel or XML file formats.
Importing From JSON
BellaDati also allows users to import data from JSON file. By using special transformation functions, it is possible to parse JSON arrays and objects.
In some cases, it might be necessary to change Array element to correctly parse the data into rows. This can be done in the import settings.
After choosing the Array element correctly, it is possible to use the function parseJSON() to load the JSON value into a variable and then access the values by using functions getString(), getInteger(), getDouble(), etc. to load the values. To access a nested object, users have to use function getJSONObject(). To access an array, function getJSONArray() is available.
Let's have a JSON file with following structure:
To be able to get the values, users need to specify sales as Array element.
To get the category, add a new column as an attribute and use following code:
To get the total items, add a new column as an indicator and use following code:
To calculate the total price from all the item prices, use this formula:
Let's have this JSON:
To access value from the JSONArray, use this formula:
Let's have this JSON:
In this case, we need to set "data,data" as the Array element.
In order to get the value from the element name, we can use the following transformation script: