DQL is a distributed query language for DSA. DQL can act both as a DSLink and an embedded library into a DSLink.
DQL acts upon the connected broker by default.
DQL shields the list
query command from listing nodes on other brokers.
This prevents massive queries that can cause a slowdown. This only applies to the list
command.
To enable multi-broker list queries, add the following command at the front of your query:
option traverseBrokers=true |
DQL uses QOS 0
by default for value subscriptions. You can configure what QOS a query will use by adding the following command
in any position in front of the subscribe command where 1
is any of 0 1 2 3
:
option qos=1 |
list *
list * | filter $type
list * | filter $type | subscribe
list * | filter $type="string" | subscribe
list * | filter $type="number" | subscribe
list * | filter @mytag | subscribe
list * | subscribe :name
list /downstream/System/* | filter $type | subscribe :name value
list /downstream/System/* | filter $type @unit!="%" | subscribe
list * | filter $type="number" | subscribe | expression double="row.value * 2"
list /downstream/etsdb/? | subscribe of
list * | filter $type | subscribe $type
list * | filter $type | subscribe | expression msg="'Value: ' + row.value"
list * | filter $type="number" | subscribe | expression min="Math.min(50, row.value)"
path /downstream/System | subscribe Memory_Usage
list /downstream/System | filter :metric | subscribe | invoke /downstream/MongoDB/local/SystemValues/publish(Path=%path, Value=%value)
list brokers
list /downstream, /upstream, /sys
list brokers | sublist /downstream/?