Skip to content

Instantly share code, notes, and snippets.

@cmackenzie1
Created December 27, 2016 19:03
Show Gist options
  • Save cmackenzie1/fbfcb50f54cb1fb4ada1e02cd3d2195e to your computer and use it in GitHub Desktop.
Save cmackenzie1/fbfcb50f54cb1fb4ada1e02cd3d2195e to your computer and use it in GitHub Desktop.
Example of a schema used to define a metrics table for diamond to to store data in a MySQL database
CREATE DATABASE IF NOT EXISTS diamond;
USE diamond;
CREATE TABLE metrics (
id int not null auto_increment,
col_time int(11), -- Stored in Seconds
col_metric varchar(255) not null, -- Name of metric in diamond form.
col_value double not null, -- value of the recorded metric
primary key(id)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment