Skip to content

Appendix

Data Types

type examples
Integer 1, -1, 1234567
Double 2.3, -3.56, 232.4
Bool TRUE, FALSE
Date 2020-06-10
Time 11:18:30
String "HStreamDB "

Keywords

keyword description
AND logical and operator
AS stream or field name alias
AVG average function
BETWEEN range operator, used with AND
BY do something by certain conditions, used with GROUP or ORDER
COUNT count function
CREATE create a stream / connector
DATE prefix of date constant
DAY interval unit
DROP drop a stream
FORMAT specify the format of a stream
FROM specify where to select data from
GROUP group values by certain conditions, used with BY
HAVING filter select values by a condition
HOPPING hopping window
INNER joining type, used with JOIN
INSERT insert data into a stream, used with INTO
INTERVAL prefix of interval constant
INTO insert data into a stream, used with INSERT
JOIN for joining two streams
LEFT joining type, used with JOIN
MAX maximum function
MIN minimum function
MINUTE interval unit
MONTH interval unit
NOT logical not operator
ON specify conditions, used with JOIN
OR logical or operator
ORDER sort values by certain conditions, used with BY
OUTER joining type, used with JOIN
SECOND interval unit
SELECT query a stream
SESSION session window
SHOW show something to stdout
STREAM specify a stream, used with CREATE
SUM sum function
TIME prefix of the time constant
TUMBLING tumbling window
VALUES specify inserted data, used with INSERT INTO
WEEK interval unit
WHERE filter selected values by a condition
WITH specify properties when creating a stream
WITHIN specify time window when joining two streams
YEAR interval unit

Operators

operator description
= equal to
<> not equal to
< less than
> greater than
<= less than or equal to
>= greater than or equal to
+ addition
- subtraction
* multiplication
. access field of a stream
[] access item of a map or an array
AND logical and operator
OR logical or operator
NOT logical not operator
BETWEEN range operator

Functions

function description
AVG average
COUNT count
MAX maximum
MIN minimum
SUM sum