Bulk Importing Data Points
When deploying Mango at scale, you often need to create hundreds or thousands of data points. Rather than configuring each point manually, Mango provides CSV-based import and export tools that let you define points in a spreadsheet and upload them in bulk.
Accessing the Bulk Import Tools
The CSV download and upload buttons are available in two locations:
- Bulk Data Point Edit page -- Navigate to Administration > Bulk Data Point Edit. The download and upload buttons appear in the upper-right corner of the page.
- Data Source page -- On the Data Points tab of any data source, the same CSV tools are available for points belonging to that source.
Export Types
When you click the Download button, a dropdown offers several export types:
- Data Points -- Exports the complete configuration of all visible data points as a CSV file.
- Event Detectors -- Exports the complete configuration of all event detectors associated with the visible data points.
- Data Points and Related Data -- Exports data points along with their event detectors and published points. Related data appears on the same row as the parent data point.
The Extended CSV export includes all columns of the data point configuration. This is especially useful when you want to create a template for future imports.
Import Process
To import data points from a CSV file:
- Export a sample point first. The safest way to build an import file is to start from an export. Configure one point of the desired type on the data source, export it as CSV, then modify the file to create additional points.
- Modify the CSV. Open the exported file in a spreadsheet application. Duplicate rows for each new point and change the values that differ (device name, point name, XID, register addresses, etc.).
- Upload the file. Click the Upload button and select the appropriate import type (Data Points, Event Detectors, or Data Points and Related Data).
- Review results. Mango will validate each row and report any errors. Points that pass validation are created or updated.
CSV Format Rules
The CSV format is specific to each data source type. The following rules must be followed:
- Column order matters. Do not rearrange columns from the exported format.
- Header names must not be modified. The first row of the CSV defines the field mappings and must match exactly.
- Template XIDs should be used. Not all properties are available within the CSV. For complex configurations, use a data point template XID to inherit default settings.
- All points must be the same data source type. You cannot mix points from different data source types (e.g., Modbus and BACnet) in a single upload file.
- New points can be created. If the XID in the CSV does not match an existing point, a new point is created. If it does match, the existing point is updated.
- Event detectors can be included. Use the
eventDetectorskey to attach detectors. When detectors appear inside a data point import, include thedataPointXidproperty.
Creating an Import Template
For repeatable deployments, create a reusable template:
- Export one fully configured data point using the Extended CSV option.
- Change the
actioncolumn fromGETtoCREATE. - Clear the
originalXid,dataSourceId,dataSourceName, anddataSourceXidcolumns (these will be set during import). - Optionally set up Excel formulas to auto-generate XIDs from other columns (e.g.,
=CONCAT("DP_", deviceID, "_", pointName)). - Remove or clear any tag columns that are not part of your standard template.
- Save as an Excel file to preserve formatting, then export to CSV for upload.
JSON Import/Export
In addition to CSV, Mango supports JSON-based import and export through the Administration > Import/Export page. The JSON format covers the full configuration of data points, event detectors, data sources, and other system objects. This is the most comprehensive import method and supports all configuration options.
To import data points via JSON:
- Navigate to Administration > Import/Export.
- Paste or upload a JSON document containing a
dataPointsarray. - Click Import to process the document.
The JSON format is also used by the REST API endpoint POST /rest/latest/json-emport/import.
Common Pitfalls
- Mixing data source types in a single CSV upload will cause all rows to fail validation.
- Missing required fields such as
nameordataTypewill result in individual row errors. Other valid rows will still be imported. - Duplicate XIDs across data sources can cause unexpected overwrites. Use a consistent XID naming scheme (e.g.,
DP_<deviceID>_<pointName>) to avoid collisions. - Large imports may take significant time. For imports of more than 1,000 points, consider splitting the file into smaller batches.
- Tags in CSV use the column header format
tags/keyName. Make sure the key name matches your tag schema exactly (tags are case-sensitive).
Tips for Large-Scale Imports
- Start with a small batch (10-20 points) to validate your CSV format before uploading thousands of points.
- Use the REST API for programmatic imports. The
POST /rest/latest/data-pointsendpoint accepts individual point configurations and returns detailed validation errors. - After a large import, verify point counts on the data source page and spot-check a few points to confirm correct configuration.
- Consider using the JSON import for complex configurations that involve event detectors, published points, and point links together.
Related Pages
- Extended CSV Export as Template — Step-by-step guide for turning a CSV export into a reusable import template
- Creating and Configuring Data Points — Manual point creation process for understanding CSV column structure
- Adding and Using Tags — Use
tags/keyNamecolumns in CSV to apply tags during bulk import - Data Point Properties Reference — Understand all configurable properties that appear as CSV columns