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
After selecting the data file, you need to wait until the file is uploaded.
Please note, that default maximum file size to import is 20MB. BellaDati Unlimited or BellaDati On-Premise may have different file size limits. You can compress the file size when importing it in a ZIP archive (see below).
Importing from CSV
When you are importing from CSV, please continue directly to Import settings page.
The maximum number of columns in a CSV file is 1000.
Importing from Microsoft Excel
After uploading XLS/XLSX file you will be prompted to select the desired spreadsheet list.
List selection will not appear when your Excel spreadsheet contains only single list.
The recommended number of columns in the XLS/XLSX file is 256.
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.
You can use the xPath syntax for the custom columns definition. For more info proceed to tutorial with example, how custom columns can be set.
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.
New data set will not be created until the import process will have been successfully completed.
Importing From JSON
Importing from JSON is available since BellaDati 2.9
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.
If the Array element is nested into another object, use "," character to separate the Array path.
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: