From 4d61800c382732444ad2a7d8ce5f7899f63675fb Mon Sep 17 00:00:00 2001 From: Travis Turner Date: Fri, 22 Dec 2017 10:20:00 -0600 Subject: [PATCH] apply comments in #1022 from cody --- docs/tutorials.md | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/docs/tutorials.md b/docs/tutorials.md index d072f7502..9c19f3a67 100644 --- a/docs/tutorials.md +++ b/docs/tutorials.md @@ -236,24 +236,6 @@ curl localhost:10101/index/patients/frame/measurements \ ``` In addition to storing rows of bits, a frame can also contain fields that store integer values. The next step creates three fields (`age`, `weight`, `tcells`) in the `measurements` frame. -``` -curl localhost:10101/index/patients/frame/measurements/field/age \ - -X POST \ - -d '{"type": "int", "min": 0, "max": 120}' - -curl localhost:10101/index/patients/frame/measurements/field/weight \ - -X POST \ - -d '{"type": "int", "min": 0, "max": 500}' - -curl localhost:10101/index/patients/frame/measurements/field/tcells \ - -X POST \ - -d '{"type": "int", "min": 0, "max": 2000}' -``` - -
-It's possible to create a frame with multiple fields in a single step. To do that, you just include a "fields" attribute to the frame options like the example below: -
- ``` curl localhost:10101/index/patients/frame/measurements \ -X POST \ @@ -267,6 +249,8 @@ curl localhost:10101/index/patients/frame/measurements \ }}' ``` +If you need to, you can add fields to an existing frame by posting to the [Create Field endpoint](../api-reference/#create-field). + Next, let's populate our fields with data. There are two ways to get data into fields: use the `SetFieldValue()` PQL function to set fields individually, or use the `pilosa import` command to import many values at once. First, let's set some field data using PQL. This query sets the age, weight, and t-cell count for the patient with ID `1` in our system: