Configuration BNF
DataStream component configuration files in YAML format conform to the following syntax.
Pipeline definitions are not covered by this grammar. A pipeline file declares name, description, and a processors list at its root rather than a component collection, so it is not a comp-decl.
comp-decl | ::= <comp-type> ":" <NEWLINE> <INDENT> <comp-def> |
comp-type | ::= "devices" | "targets" | "routes" | "environments" | "definitions" | "credentials" | "secrets" |
comp-def | ::= <comp-item> [<NEWLINE> <comp-item>]* |
comp-item | ::= <id-fld-def> <fld-defs> |
id-fld-def | ::= "-" <fld-name> ":" <fld-val> |
fld-defs | ::= <fld-def> [<NEWLINE> <INDENT> <fld-def>]* |
fld-def | ::= <fld-name> ":" <fld-vals> |
fld-vals | ::= <fld-val> | <inline-list> | <block-list> | <map-val> |
map-val | ::= <NEWLINE> <INDENT> <fld-defs> |
inline-list | ::= "[" <fld-val> ("," <fld-val>)* "]" |
block-list | ::= (<NEWLINE> <INDENT> "-" <fld-val>)+ |
fld-val | ::= txt-val | num-val |
txt-val | ::= <plain-val> | <quoted-val> |
plain-val | ::= <val-char>+ |
quoted-val | ::= '"' <any-char except '"'>* '"' | "'" <any-char except "'">* "'" |
num-val | ::= ('-' | '+')? <num-char>+ |
txt-char | ::= 'a' .. 'z' | 'A' .. 'Z' | '_' |
val-char | ::= any printable character except a leading indicator or an unquoted ":" — the YAML plain-scalar set, which admits dots, hyphens, slashes, spaces and template placeholders |
id | ::= <txt-char> (<txt-char> | <num-char>)* |
fld-name | ::= <id> ["." <id>]* |
num-char | ::= '0' .. '9' |
<NEWLINE> | ::= '\n' | "\r\n" |
<INDENT>* | ::= '\t' | [' ']{2,} |
Indentation Rule
* Users may choose tabs or multiple spaces for indentation. However, the pattern must be consistent in all configuration files, and follow the layout given in the code samples found throughout this guide.