Importing data into Bento Box
  • 15 May 2024
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

Importing data into Bento Box

  • Dark
    Light

Article summary

This section covers everything you need to know about the Bento import service, covering frequently asked questions and linking to details on each data type.

How it works

Your Bento representative will give you access to a folder in an Amazon S3 bucket to securely upload your data (providing a different file for each entity). When the data is ready and it matches the schema (see below for the required data and format), upload it to the specified folder and let Bento know. Our import service will then validate the data, feeding back any issues with suggested fixes, and when those are fixed, ingest it into our system. We will let you know as soon as possible once the process is complete.

Data types

To fully onboard onto Bento, we require the following different types of data, where each file is a valid JSON matching our schema. These files will cover:

For large input files (more than 1 Gigabyte in size) we request that each individual data object (e.g. an order) be on a single new line, for example:

{ 
  "orders": [ 
    { delegateId: 'order-1', ...}, 
    { delegateId: 'order-2', ...}, ... 
    { delegateId: 'order-560112', ...} 
  ] 
}

Key

  • Field names will be in bold

  • Example values, where mentioned, will be in italics

JSON Schema Validation

All the above data types will have a JSON schema provided in the linked documentation, specifying the different fields and data types the import data must have. In order to save time re-working and re-uploading the data, you can check against the import format in code or use an online validator. The import service will reject any files where the data does not match the schema.

To reduce the likelihood of this, double-check the documentation for each data type carefully to ensure the files meet our requirements, and feel free to use a JSON Schema faker to try generating an example that matches our schema if you'd like to see more examples of data match.

Note: an accepted schema does not guarantee that the data is valid, as it only checks types. Data may be in the right format but still be incorrect, for example, if an order contains a subscription ID which does not exist in the order imports JSON, this would be accepted by the schema but not by the imports service.

FAQs

What is a JSON schema?

A JSON schema is a blueprint for defining the structure, data types, and validation rules for JSON data. It acts as a set of guidelines that specify how data should be organized and what values are valid for each field. JSON schemas are used to ensure data consistency and accuracy, reducing the chance of an error when importing into our system.

Why is JSON the preferred import method?

JSON is the preferred data format for our Import Service due to its structured nature, flexibility in handling complex data, support for data validation through JSON Schema, human-readability, compatibility with APIs, and the ability to include metadata.

Support

If you run into any issues or would like to share feedback, please get in contact via the Bento Help Desk.


Was this article helpful?