Bulk Loading Guide

Import historical events from CSV or JSON

Import historical events from CSV or JSON via command line with keen-cli.

Installation instructions:

  1. Follow the instructions in the keen-cli README.md.
  2. Once you upload your data, verify if it was successful by viewing the Streams Manager in your Keen IO project console.

Here’s an example command that adds events from a CSV file into a Keen IO collection called “signups”.

$ keen events:add --collection signups --file events.csv --csv

Load Historical Data Programmatically

There are a few options for loading your historical event data programatically:

Tips for bulk loading:

  • Make sure you set the keen.timestamp property to your historical event’s timestamp. Otherwise Keen IO will assume your event happened at the time you posted it.
  • We recommend posting in batches of 5,000 events or smaller.
Once the API acknowledges that your event has been stored, it may take up to 10 seconds before it will appear in query results.