Importing data
1
Prepare your data
Prepare the raw data file that you need to bring into your project in Mangrove. Acceptable file formats include CSV, XLS, and XLSX.
- Ensure you’re using the right import template
- Populate all required columns in the template
To streamline imports, ensure that data in the import templates reflect the correct formatting (e.g., date format or datetime format) and units (e.g., values in (%) should be between 0 to 100). A best practice is to “paste as value only” into the import templates to avoid copying external links and formulae into the template.
2
Upload the file
Upload the file into the corresponding Data Source in the Mangrove platform
- Orders recorded for this customer will have the currency set as the default
- Save contacts, and important information about the customer’s registry accounts
3
Review the loaded events
Events are transformed from your bulk import and populate the Analytics charts and Events Feed.
- View event data: by selecting each event on the feed
- Attach evidence files to relevant events: with Upload Evidence on each event
- Filtering events: You can filter for specific event types and time ranges in the feed and on the Analytics charts
- Reviewing issues with imports: Issues with bulk imports would be reflected as
errored
bulk jobs. Review the error message for more detail on the specific issue transforming the data in your bulk import file into Mangrove. - Cancel or Reverse an import: Mistakenly import wrong data? A completed bulk job can be Reversed. A bulk job that has already started can be Canceled - any existing data transformed from your import file will be deleted.
- Retry an import
Data transformations
Transformations can be written by Admin users to be applied to every new file bulk imported from that data source. Transformations can be applied to bulk import files to generate events and evidences from them.Editing transformations on each Data Source
Admin users can define the event types that are generated from every Data Source through the Transformations Editor.- In Data Inputs > Input Settings, select an existing Data Source
- Add transformation
- Select an event type for data from the Data Source
- Edit the Python transformation in the editor
results
array of objects representing the events to generate from the import data. An example is shown below:
Transformation
results
array might look like following execution of the transformation above:
results
Data Inputs > Events
feed that can be used to run production models.
Transformed Event Attributes
Below is the full list of fields that can be defined for each event object transformed from the import data:Props
Props
A timestamp in the format
%Y-%m-%d %H:%M:%S%z
(ex. 2024-02-01 12:00:00-04:00
), where timezone is specified as a +/-
offset.A timestamp in the format
%Y-%m-%d %H:%M:%S%z
(ex. 2024-02-01 12:00:00-04:00
), where timezone is specified as a +/-
offset.An array of datapoints, each specifying a
slug
identifier for the corresponding datapoint type, and a value
matching the expected value_type
for that datapoint type.An array of objects representing either existing locations or new locations to be created. The system will attempt to match with existing locations using the
name
attribute. If it cannot find an existing location, it will create a new one using the name
, lat
, and long
attributes provided.An array of objects representing text-based evidence files to attach to the event. Each object must define a
name
for the file (without file extension), a file type
(supported: json | geojson | text | csv
), and file content
as a string. The system will attach the specified file content as evidence on the transformed event.Using external packages in transformations
Apart from the Python standard library, Mangrove also supports a curated list of external packages that you can import and use in transformations:mapbox
boto3
geopy
pandas
numpy