Skip to content

Commit 52d2cde

Browse files
committed
Fixing links and adding releases
1 parent 02e9f85 commit 52d2cde

File tree

6 files changed

+98
-93
lines changed

6 files changed

+98
-93
lines changed

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Bullet queries allow you to filter, project and aggregate data. You can also spe
6363

6464
* See the [UI Usage section](ui/usage.md) for using the UI to build Bullet queries. This is the same UI you will build in the Quick Starts.
6565

66-
* See the [API section](ws/api.md) for building Bullet API queries
66+
* See the API section ([JSON](ws/api-json.md), [BQL](ws/api-bql.md)) for building Bullet API queries
6767

6868
* For examples using the API, see [Examples](ws/examples.md). These are actual albeit cleansed queries sourced from the instance at Yahoo.
6969

@@ -119,7 +119,7 @@ For example, you could launch a query for 2 minutes, and have Bullet return a CO
119119

120120
![Time-Based Tumbling Windows](../img/time-based-tumbling.png)
121121

122-
See documentation on [the Web Service API](ws/api.md) for more info.
122+
See documentation on the Web Service API for more info.
123123

124124
# Results
125125

@@ -177,7 +177,7 @@ The rest of the pieces are just the standard other two pieces in a full-stack ap
177177
* A Web Service that talks to the backend using the PubSub layer
178178
* A UI that talks to this Web Service
179179

180-
The [Bullet Web Service](ws/api.md) is built using [Spring Boot](https://projects.spring.io/spring-boot/) in Java and the [UI](ui/usage.md) is built in [Ember](emberjs.com).
180+
The [Bullet Web Service](ws/examples.md) is built using [Spring Boot](https://projects.spring.io/spring-boot/) in Java and the [UI](ui/usage.md) is built in [Ember](emberjs.com).
181181

182182
The Web Service can be deployed as a standalone Java application (a JAR file) or easily rebuilt as a WAR to deploy your favorite servlet container like [Jetty](http://www.eclipse.org/jetty/). The UI is a client-side application that can be served using [Node.js](http://nodejs.org/)
183183

docs/releases.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ The Bullet UI that lets you build, run, save and visualize results from Bullet.
154154

155155
| Date | Release | Highlights |
156156
| ------------ | -------------------------------------------------------------------------------------- | ---------- |
157+
| 2018-07-20 | [**0.6.0**](https://github.com/bullet-db/bullet-ui/releases/tag/v0.6.0) | Supports adding a full default starting query |
157158
| 2018-06-18 | [**0.5.0**](https://github.com/bullet-db/bullet-ui/releases/tag/v0.5.0) | Supports windowing, uses IndexedDB and Ember 3! |
158159
| 2017-08-22 | [**0.4.0**](https://github.com/bullet-db/bullet-ui/releases/tag/v0.4.0) | Query sharing, collapsible Raw view, and unsaved/error indicators. Settings rename and other bug fixes|
159160
| 2017-05-22 | [**0.3.2**](https://github.com/bullet-db/bullet-ui/releases/tag/v0.3.2) | Exporting to TSV in Pivot table. Fixes unselectability bug in Raw view |

docs/ui/setup.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The configuration for the UI lets you have different instances of Bullet for dif
8383
| modelVersion | This is used an indicator to apply changes to the stored queries, results etc. It is monotonically increasing. On startup, changes specified in ```migrations``` will be applied if the old modelVersion is not present or is < than this number |
8484
| migrations | is an object that currently supports one key: ```deletions``` of type string. The value can be set to either ```result``` or ```query```. The former wipes all existing results. The latter wipes everything. See ```modelVersion``` above. |
8585
| helpLinks | Is a list of objects, where each object is a help link. These links populate the "Help" drop-down on the UI's top navbar. You can add links to explain your data for example |
86-
| defaultFilter | Can either be a [API Filter](../ws/api.md#filters) or a URL from which one could be fetched dynamically. The UI adds this to every newly created Query. You could use this as a way to have user specific (for example, cookie based) filters created for your users when they create a new query in the UI. Note that if you have are accessing a map subfield and your field value in the filter is set as ```foo.bar``` and you want ```bar``` to be the subfield in the UI query builder, you will need to add a key called ```subfield``` in the filter (not supported by the API) and set its value to ```true``` |
86+
| defaultQuery | Can either be a [API Query](../ws/api-json.md) or a URL from which one could be fetched dynamically. The UI makes this the query created on every newly created Query. You could use this as a way to have user specific (for example, cookie based) filters created for your users or customize an aggregation when they create a new query in the UI. Note that if you have are accessing a map subfield and your field value in the filter is set as ```foo.bar``` and you want ```bar``` to be the subfield in the UI query builder, you will need to add a key called ```subfield``` in the filter (not supported by the API) and set its value to ```true``` |
8787
| bugLink | Is a URL that by default points to the issues page for the UI GitHub repository. You can change it to point to your own custom JIRA queue or something else |
8888
| defaultValues | Is an object that lets you configures defaults for various query parameters and lets you tie your custom backend settings to the UI |
8989

@@ -126,7 +126,7 @@ These are the properties in the ```defaultValues``` object. The Validated column
126126
You can specify values for each property above in the ```env-settings.json``` file. These will be used when running a custom instance of the UI (see [above](#Running)).
127127

128128
The ```default``` property in the ```env-settings.json``` that loads default settings for the UI that can be selectively overridden based on which environment you are running on. All settings explained above have default values
129-
that are the same as the [default backend settings](https://github.com/bullet-db/bullet-storm/blob/master/src/main/resources/bullet_defaults.yaml). However, the defaults do not add the ```defaultFilter``` setting explained above.
129+
that are the same as the [default backend settings](https://github.com/bullet-db/bullet-storm/blob/master/src/main/resources/bullet_defaults.yaml). However, the defaults do not add the ```defaultQuery``` setting explained above.
130130

131131
```json
132132
{
@@ -208,7 +208,7 @@ To cement all this, if you wanted an instance of the UI in your CI environment,
208208
"distributionMaxNumberOfPoints": 50
209209
}
210210
},
211-
"defaultFilter": "http://bullet-ws.dev.domain.com:4080/custom-endpoint/api/defaultQuery"
211+
"defaultQuery": "http://bullet-ws.dev.domain.com:4080/custom-endpoint/api/defaultQuery"
212212
}
213213
}
214214
```
@@ -221,7 +221,7 @@ Your UI on your CI environment will:
221221
* Allow queries to run as long as 300 seconds
222222
* Use 32768 in the help menu for the max number of unique elements that can be counted exactly
223223
* Allow only 50 points to be generated for Distribution queries
224-
* GET and cache a defaultFilter from ```http://bullet-ws.dev.domain.com:4080/custom-endpoint/api/defaultQuery```
224+
* GET and cache a defaultQuery from ```http://bullet-ws.dev.domain.com:4080/custom-endpoint/api/defaultQuery```
225225

226226
You would make express use these settings by running
227227

docs/ui/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You can also download the results in JSON, CSV or flattened CSV (fields inside m
4747

4848
## Filtering and projecting data
4949

50-
The Filters section in the UI features a querybuilder (a modified version of the [jQuery-QueryBuilder](http://querybuilder.js.org/)) that you can use to add filters. These allow you to [pick at the slice of data](../ws/api.md#filters) from your stream that is relevant to you.
50+
The Filters section in the UI features a querybuilder (a modified version of the [jQuery-QueryBuilder](http://querybuilder.js.org/)) that you can use to add filters. These allow you to [pick at the slice of data](../ws/api-json.md#filters) from your stream that is relevant to you.
5151

5252
The Output Data section lets you aggregate or choose to see raw data records. You can either get all the data as [above](#a-simple-first-query) or you can select a subset of fields (and optionally rename them) that you would like to see.
5353

docs/ws/api-bql.md

Lines changed: 83 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,90 @@ BQL queries that are received by the Web Service will be detenced and automatica
88
[the JSON format](api-json.md) before being sent to the backend (which requires the basic JSON format). This converstion
99
is done in the web service using [the bullet-bql library](../releases/#bullet-bql).
1010

11-
# Overview
11+
## Overview
1212

13-
Bullet-BQL provides users with a friendly SQL-like API to submit queries to the Web Service.
13+
Bullet-BQL provides users with a friendly SQL-like API to submit queries to the Web Service instead of using the more
14+
cumbersome [JSON API](api-json.md).
15+
16+
## Statement Syntax
17+
18+
SELECT DISTINCT? select_clause
19+
FROM from_clause
20+
( WHERE where_clause )?
21+
( GROUP BY groupBy_clause )?
22+
( HAVING having_clause )?
23+
( ORDER BY orderBy_clause )?
24+
( WINDOWING windowing_clause )?
25+
( LIMIT limit_clause )?;
26+
27+
where `select_clause` is one of
28+
29+
*
30+
COUNT( DISTINCT reference_expr ( , reference_expr )? )
31+
group_function ( AS? ColumnReference )? ( , group_function ( AS? ColumnReference )? )? ( , reference_expr ( AS? ColumnReference )? )?
32+
reference_expr ( AS? ColumnReference )? ( , reference_expr ( AS? ColumnReference )? )?
33+
distribution_type( reference_expr, input_mode ) ( AS? ColumnReference )?
34+
TOP ( ( Integer | Long ) ( , Integer | Long ) )? , reference_expr ( , reference_expr )? ) ( AS? ColumnReference )?
35+
36+
37+
`group_function` is one of `SUM(reference_expr)`, `MIN(reference_expr)`, `MAX(reference_expr)`, `AVG(reference_expr)` and `COUNT(*)`. `reference_expr` is one of ColumnReference and Dereference. `distribution_type` is one of `QUANTILE`, `FREQ` and `CUMFREQ`. The 1st number in `TOP` is K, and the 2nd number is an optional threshold. The `input_mode` is one of
38+
39+
LINEAR, ( Integer | Long ) evenly spaced
40+
REGION, ( Integer | Long ), ( Integer | Long ), ( Integer | Long ) evenly spaced in a region
41+
MANUAL, ( Integer | Long ) (, ( Integer | Long ) )* defined points
42+
43+
and `from_clause` is one of
44+
45+
STREAM() default time duration will be set from BQLConfig
46+
STREAM( ( Long | MAX ), TIME ) time based duration control.
47+
STREAM( ( Long | MAX ), TIME, ( Long | MAX ), RECORD ) time and record based duration control.
48+
49+
`RECORD` will be supported in the future.
50+
51+
and `where_clause` is one of
52+
53+
NOT where_clause
54+
where_clause AND where_clause
55+
where_clause OR where_clause
56+
reference_expr IS NOT? NULL
57+
reference_expr IS NOT? EMPTY
58+
reference_expr IS NOT? DISTINCT FROM value_expr
59+
reference_expr NOT? BETWEEN value_expr AND value_expr
60+
reference_expr NOT? IN ( value_expr ( , value_expr )* )
61+
reference_expr NOT? LIKE ( value_expr ( , value_expr )* )
62+
reference_expr ( = | <> | != | < | > | <= | >= ) value_expr
63+
64+
`value_expr` is one of Null, Boolean, Integer, Long, Double, Decimal and String.
65+
66+
and `groupBy_clause` is one of
67+
68+
() group all
69+
reference_expr ( , reference_expr )* group by
70+
( reference_expr ( , reference_expr )* ) group by
71+
72+
and `HAVING` and `ORDER BY` are only supported for TopK. In which case, `having_clause` is
73+
74+
COUNT(*) >= Integer
75+
76+
and `orderBy_clause` is
77+
78+
COUNT(*)
79+
80+
and `windowing_clause` is one of
81+
82+
( EVERY, ( Integer | Long ), ( TIME | RECORD ), include )
83+
( TUMBLING, ( Integer | Long ), ( TIME | RECORD ) )
84+
85+
`include` is one of
86+
87+
ALL
88+
FIRST, ( Integer | Long ), ( TIME | RECORD )
89+
LAST, ( Integer | Long ), ( TIME | RECORD ) will be supported
90+
91+
and `limit_clause` is one of
92+
93+
Integer | Long
94+
ALL will be supported
1495

1596
## Data Types
1697

@@ -109,83 +190,3 @@ Reserved keywords must be double quoted in order to be used as ColumnReference o
109190
| `WHEN` | reserved | reserved |
110191
| `WHERE` | reserved | reserved |
111192
| `WITH` | reserved | reserved |
112-
113-
## Statement Syntax
114-
115-
SELECT DISTINCT? select_clause
116-
FROM from_clause
117-
( WHERE where_clause )?
118-
( GROUP BY groupBy_clause )?
119-
( HAVING having_clause )?
120-
( ORDER BY orderBy_clause )?
121-
( WINDOWING windowing_clause )?
122-
( LIMIT limit_clause )?;
123-
124-
where `select_clause` is one of
125-
126-
*
127-
COUNT( DISTINCT reference_expr ( , reference_expr )? )
128-
group_function ( AS? ColumnReference )? ( , group_function ( AS? ColumnReference )? )? ( , reference_expr ( AS? ColumnReference )? )?
129-
reference_expr ( AS? ColumnReference )? ( , reference_expr ( AS? ColumnReference )? )?
130-
distribution_type( reference_expr, input_mode ) ( AS? ColumnReference )?
131-
TOP ( ( Integer | Long ) ( , Integer | Long ) )? , reference_expr ( , reference_expr )? ) ( AS? ColumnReference )?
132-
133-
134-
`group_function` is one of `SUM(reference_expr)`, `MIN(reference_expr)`, `MAX(reference_expr)`, `AVG(reference_expr)` and `COUNT(*)`. `reference_expr` is one of ColumnReference and Dereference. `distribution_type` is one of `QUANTILE`, `FREQ` and `CUMFREQ`. The 1st number in `TOP` is K, and the 2nd number is an optional threshold. The `input_mode` is one of
135-
136-
LINEAR, ( Integer | Long ) evenly spaced
137-
REGION, ( Integer | Long ), ( Integer | Long ), ( Integer | Long ) evenly spaced in a region
138-
MANUAL, ( Integer | Long ) (, ( Integer | Long ) )* defined points
139-
140-
and `from_clause` is one of
141-
142-
STREAM() default time duration will be set from BQLConfig
143-
STREAM( ( Long | MAX ), TIME ) time based duration control.
144-
STREAM( ( Long | MAX ), TIME, ( Long | MAX ), RECORD ) time and record based duration control.
145-
146-
`RECORD` will be supported in the future.
147-
148-
and `where_clause` is one of
149-
150-
NOT where_clause
151-
where_clause AND where_clause
152-
where_clause OR where_clause
153-
reference_expr IS NOT? NULL
154-
reference_expr IS NOT? EMPTY
155-
reference_expr IS NOT? DISTINCT FROM value_expr
156-
reference_expr NOT? BETWEEN value_expr AND value_expr
157-
reference_expr NOT? IN ( value_expr ( , value_expr )* )
158-
reference_expr NOT? LIKE ( value_expr ( , value_expr )* )
159-
reference_expr ( = | <> | != | < | > | <= | >= ) value_expr
160-
161-
`value_expr` is one of Null, Boolean, Integer, Long, Double, Decimal and String.
162-
163-
and `groupBy_clause` is one of
164-
165-
() group all
166-
reference_expr ( , reference_expr )* group by
167-
( reference_expr ( , reference_expr )* ) group by
168-
169-
and `HAVING` and `ORDER BY` are only supported for TopK. In which case, `having_clause` is
170-
171-
COUNT(*) >= Integer
172-
173-
and `orderBy_clause` is
174-
175-
COUNT(*)
176-
177-
and `windowing_clause` is one of
178-
179-
( EVERY, ( Integer | Long ), ( TIME | RECORD ), include )
180-
( TUMBLING, ( Integer | Long ), ( TIME | RECORD ) )
181-
182-
`include` is one of
183-
184-
ALL
185-
FIRST, ( Integer | Long ), ( TIME | RECORD )
186-
LAST, ( Integer | Long ), ( TIME | RECORD ) will be supported
187-
188-
and `limit_clause` is one of
189-
190-
Integer | Long
191-
ALL will be supported

docs/ws/examples.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ A sample response could be (it has been edited to remove PII and other Yahoo dat
9999
**BQL Query**
100100

101101
```SQL
102-
SELECT timestamp AS ts, device_timestamp AS device_ts,
102+
SELECT timestamp AS ts, device_timestamp AS device_ts,
103103
event AS event, page_domain AS domain, page_id AS id
104104
FROM STREAM(20000, TIME)
105105
WHERE id = 'btsg8l9b234ha' AND page_id IS NOT NULL
@@ -313,6 +313,8 @@ WHERE demographics.age > 65
313313
GROUP BY ();
314314
```
315315

316+
Note that the ```GROUP BY ()``` is optional.
317+
316318
**JSON Query**
317319

318320
```javascript
@@ -367,12 +369,13 @@ COUNT is the only GROUP operation for which you can omit a "field".
367369
**BQL Query**
368370

369371
```SQL
370-
SELECT COUNT(*) AS numCalifornians, AVG(demographics.age) AS avgAge,
372+
SELECT COUNT(*) AS numCalifornians, AVG(demographics.age) AS avgAge,
371373
MIN(demographics.age) AS minAge, MAX(demographics.age) AS maxAge
372374
FROM STREAM(20000, TIME)
373375
WHERE demographics.state = 'california'
374376
GROUP BY ();
375377
```
378+
Note that the ```GROUP BY ()``` is optional.
376379

377380
**JSON Query**
378381

@@ -511,7 +514,7 @@ was estimated or not. The ```standard_deviations``` key denotes the confidence a
511514
**BQL Query**
512515

513516
```SQL
514-
SELECT COUNT(DISTINCT ip_address) AS uniqueIPs"
517+
SELECT COUNT(DISTINCT ip_address) AS uniqueIPs
515518
FROM STREAM(10000, TIME);
516519
```
517520

0 commit comments

Comments
 (0)