timescaledb/docs/UsingSamples.md

1.7 KiB

Using our Sample Datasets

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.

(Note that these dataset backups already include our time-series database, so you won't need to manually install our extension, nor run the setup scripts, etc.)

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

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)
  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.

# To access your database (e.g., devices_small)
psql -U postgres -h localhost -d devices_small