some test data for working with distinct at the cli

pull/2568/head
Cory LaNou 2015-05-13 15:46:29 -06:00
parent 3d30720ec4
commit 639311b00b
1 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,29 @@
echo "creating database"
curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE foo"
echo "creating retention policy"
curl -G http://localhost:8086/query --data-urlencode "q=CREATE RETENTION POLICY bar ON foo DURATION 300d REPLICATION 3 DEFAULT"
echo "inserting data"
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-01T00:00:00.000Z","fields": {"value": 1.1}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-01T08:00:00.000Z","fields": {"value": 1.2}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-01T16:00:00.000Z","fields": {"value": 1.3}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-02T00:00:00.000Z","fields": {"value": 2.1}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-02T08:00:00.000Z","fields": {"value": 2.2}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-02T16:00:00.000Z","fields": {"value": 2.3}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-03T00:00:00.000Z","fields": {"value": 3.1}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-03T08:00:00.000Z","fields": {"value": 3.2}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-03T16:00:00.000Z","fields": {"value": 3.3}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-04T00:00:00.000Z","fields": {"value": 4.1}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-04T08:00:00.000Z","fields": {"value": 4.2}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "time": "2015-05-04T16:00:00.000Z","fields": {"value": 4.3}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "names", "time": "2015-05-01T00:00:00.000Z","fields": {"first": "suzie", "last": "smith"}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "names", "time": "2015-05-01T08:00:00.000Z","fields": {"first": "frank", "last": "smith"}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "names", "time": "2015-05-01T16:00:00.000Z","fields": {"first": "jonny", "last": "jones"}}]}' -H "Content-Type: application/json" http://localhost:8086/write