Command Line Interface¶

The command line interface (CLI) can be used to interact with the local Joule service or any Joule node on the network. Arguments can often be supplied in both short and long forms, and many are optional. The documentation uses the following conventions:

• An argument that takes an additional parameter is denoted -f FILE.
• The syntax -f FILE, --file FILE indicates that either the short form (-f) or long form (--file) can be used interchangeably.
• Square brackets ([]) denote optional arguments.
• Pipes (A|B) indicate that either A or B can be specified, but not both.
• Curly braces ({}) indicate a list of mutually-exclusive argument choices.
Usage
joule ~ [--help] [-u] [-v] {module, stream, folder, data} ...
Arguments
-u URL, --url URL: default http://localhost:8088 Joule node URL. Must be specified before the subcommand --help: Print a help message with usage information on all supported command-line arguments. This can also be specified after the subcommand in which case the usage and arguments of the subcommand are shown instead -v, --version: print the joule CLI version subcommand: The subcommand followed by its arguments. This is required

base¶

info¶

show information about the joule service

Usage
joule info ~ [--help]
Arguments
none
Example

info¶

Usage
joule module info ~ [--help] NAME
Arguments
NAME: module name (from configuration file)
Example

stream¶

list¶

show the contents of the stream database

Usage
joule stream list ~ [-l] [-s] [--help]
Arguments
-l, --layout: include stream layout -s, --status: include stream status
Example

destroy¶

Completely remove the stream at the specified path

Usage
joule stream destroy ~ PATH
Arguments
PATH: path of stream to destroy

move¶

Move a stream into a new folder.

Usage
joule stream move ~ PATH DESTINATION
Arguments
PATH: path of stream to move DESTINATION: path of destination folder
Notes
The folder will be created if it does not exist. A stream cannot be moved into a folder which has a stream with the same name

folder¶

move¶

move a folder into a new parent folder.

Usage
joule folder move ~ PATH DESTINATION
Arguments
PATH: path of folder to move DESTINATION: path of new parent folder
Note:
The parent folder will be created if it does not exist. A folder cannot be moved into a parent folder which has a folder with the same name

remove¶

remove a folder

Usage
joule folder remove ~ [-r] PATH
Arguments
-r, --recursive: remove subfolders PATH: path of folder to remove
Notes
If the folder has subfolders, add -r to recursively remove them. The folder and its subfolders may not have any streams, if they do more or remove them first.

data¶

copy¶

copy data between streams

Usage
joule data copy ~ [-s] [-e] [-U] SOURCE DESTINATION
Arguments
-s, --start: timestamp or descriptive string, if omitted start copying at the beginning of SOURCE -e, --end: timestamp or descriptive string, if omitted copy to the end of SOURCE -U, --dest-url: destination URL if different than source (specify source URL with top level -u flag)

extract data from a stream

Usage
joule data read ~ [-s] [-e] [-r|-d] [-b] [-m] PATH
Arguments
-s, --start: timestamp or descriptive string, if omitted start reading at the beginning -e, --end: timestamp or descriptive string, if omitted read to the end -r: limit the response to a maximum number of rows (this will produce a decimated result) -d: specify a particular decimation level, may not be used with -r, default is 1 -b: include min/max limits for each row of decimated data -m: include [# interval break] tags in the output to indicate broken data intervals PATH: path of stream to read
Example
# write the last hour of data from /demo/random into data.txt $> joule data read /demo/random --start="1 hour ago" > data.txt$> head data.txt 1538744825370107 0.383491 0.434531 1538744825470107 0.317079 0.054972 1538744825570107 0.572721 0.875278 1538744825670107 0.350911 0.680056 1538744825770107 0.839264 0.189361 1538744825870107 0.259714 0.394411 1538744825970107 0.027148 0.963998 1538744826070107 0.828187 0.704508 1538744826170107 0.738999 0.082351 1538744826270107 0.828530 0.916019

remove¶

remove data from a stream

Usage
joule data remove ~ [--from] [--to] STREAM
Arguments
-s, --start: timestamp or descriptive string, if omitted start reading at the beginning of SOURCE -e, --end: timestamp or descriptive string, if omitted read to the end of SOURCE