timescaledb/docs/UsingSamples.md
2017-02-09 14:36:42 -05:00

1.5 KiB

Using our samples

Available samples

We have created several sample datasets (using pg_dump) to help you get started using iobeamdb. These datasets vary in database size, number of time intervals, and number of values for the partition field.

Device ops: These datasets are designed to represent metrics (e.g. CPU, memory, network) collected from mobile devices.

  1. devices_small - 1,000 devices recorded over 1,000 time intervals
  2. devices_med - 10,000 devices recorded over 1,000 time intervals
  3. devices_big - 3,000 devices recorded over 10,000 time intervals

(TODO - Host these somewhere and make linkable)

Importing

Data is easily imported using the standard way of restoring pg_dump backups. Briefly the steps are (1) unzip the archive, (2) create a database for the data (using the same name as the dataset), and (3) import the data via psql. Each of our archives is named [dataset_name].bak.tar.gz, so if you are using dataset devices_small, the commands are:

# (1) unzip the archive
tar -xvzf devices_small.bak.tar.gz
# (2) create a database with the same name
psql -U postgres -h localhost -c 'CREATE DATABASE devices_small;'
# (3) import data
psql -U postgres -d devices_small -h localhost < devices_small.bak

The data is now ready for you to use.