šŸ”—Command Line Interface API

šŸ”—Introduction

The Command Line Interface (CLI, or CDAP CLI) provides methods to interact with the CDAP server from within a shell, similar to the HBase or bash shells. It is located within the SDK, at bin/cdap-cli as either a bash script or a Windows .bat file.

It can be installed on Distributed CDAP, in which case it will be installed either in /opt/cdap/cli or, in the case of Cloudera Manager, opt/cloudera/parcels/cdap/cli/.

The CLI may be used in two ways: interactive mode and non-interactive mode.

šŸ”—Interactive Mode

To run the CLI in interactive mode, run the cdap cli executable with no arguments from a terminal:

$ ./bin/cdap cli
> .\bin\cdap.bat cli
$ /opt/cdap/cli/bin/cdap cli
$ /opt/cloudera/parcels/cdap/cli/bin/cdap cli

The executable should bring you into a shell, with a prompt similar to:

cdap (http://localhost:11015/namespace:default)>

This indicates that the CLI is currently set to interact with the CDAP server at localhost.

  • To interact with a different CDAP server by default, set the environment variable CDAP_HOST to a hostname.
  • To change the current CDAP server, run the CLI command connect example.com.
  • To connect to an SSL-enabled CDAP server, run the CLI command connect https://example.com.

For example, with CDAP_HOST set to example.com, the CLI would be interacting with a CDAP instance at example.com, port 11015:

cdap (http://example.com:11015/namespace:default)>

To list all of the available commands, enter the CLI command help:

cdap (http://localhost:11015/namespace:default)> help

In this documentation, to save space, this prompt is abbreviated to:

cdap >

šŸ”—Non-Interactive Mode

To run the CLI in non-interactive mode, run the CDAP CLI executable, passing the command you want executed as the argument. For example, to list all applications currently deployed to CDAP, execute:

$ cdap cli list apps
> cdap cli list apps

šŸ”—Connecting to Secure CDAP Instances

When connecting to secure CDAP instances, the CLI will look for an access token located at ~/.cdap.accesstoken.<hostname> and use it if it exists and is valid. If not, the CLI will prompt you for the required credentials to acquire an access token from the CDAP instance. Once acquired, the CLI will save it to ~/.cdap.accesstoken.<hostname> for later use and use it for the rest of the current CLI session.

šŸ”—Options

The CLI can be started with command-line options:

usage: cdap cli [--autoconnect <true|false>] [--debug] [--help]
                   [--verify-ssl <true|false>] [--uri <uri>][--script
                   <script-file>]
 -a,--autoconnect <arg>   If "true", try provided connection (from uri)
                          upon launch or try default connection if none
                          provided. Defaults to "true".
 -d,--debug               Print exception stack traces.
 -h,--help                Print the usage message.
 -s,--script <arg>        Execute a file containing a series of CLI
                          commands, line-by-line.
 -u,--uri <arg>           CDAP instance URI to interact with in the format
                          "[http[s]://]<hostname>[:<port>[/<namespace>]]".
                          Defaults to
                          "http://<hostname>.local:11015".
 -v,--verify-ssl <arg>    If "true", verify SSL certificate when making
                          requests. Defaults to "true".
usage: cdap.bat cli [--autoconnect <true|false>] [--debug] [--help]
                    [--verify-ssl <true|false>] [--uri <uri>][--script
                    <script-file>]
 -a,--autoconnect <arg>   If "true", try provided connection (from uri)
                          upon launch or try default connection if none
                          provided. Defaults to "true".
 -d,--debug               Print exception stack traces.
 -h,--help                Print the usage message.
 -s,--script <arg>        Execute a file containing a series of CLI
                          commands, line-by-line.
 -u,--uri <arg>           CDAP instance URI to interact with in the format
                          "[http[s]://]<hostname>[:<port>[/<namespace>]]".
                          Defaults to
                          "http://<hostname>.local:11015".
 -v,--verify-ssl <arg>    If "true", verify SSL certificate when making
                          requests. Defaults to "true".

šŸ”—Settings

Certain commands (cli render as, connect, and use namespace) affect how the CLI works for the duration of a session.

  • The command cli render as <table-renderer> (from the General commands) sets how table data is rendered. Valid options are either alt (the default) and csv. As the alt option may split a cell into multiple lines, you may need to use csv if you want to copy and paste the results into another application or include in a message.

    • With cli render as alt (the default), a command such as list apps will be output as:

      +================================+
      | app id      | description      |
      +=============+==================+
      | PurchaseApp | Some description |
      +=============+==================+
      
    • With cli render as csv, the same list apps would be output as:

      app id,description
      PurchaseApp,Some description
      
  • The command connect (from the General commands) allows you to connect to a CDAP instance.

  • The command use namespace (from the Namespace commands) allows you to set the namespace used with all subsequent commands. By default, all sessions start in the default namespace.

šŸ”—Available Commands

These are the available commands:

šŸ”—General

Command Description
cli render as <table-renderer> Modifies how table data is rendered. Valid options are 'alt' (the default) and 'csv'.
cli version Prints the CDAP CLI version
connect <cdap-instance-uri> [<verify-ssl-cert>] Connects to a CDAP instance
delete route-config for service <app-id.service-id> Delete the route configuration for a service
exit Exits the CDAP CLI
get route-config for service <app-id.service-id> Get the route configuration for a service
quit Exits the CDAP CLI
set route-config for service <app-id.service-id> <route-config> Set the route configuration for a service. <route-config> is specified in the format 'version1=number1 version2=number2'.

šŸ”—Application Lifecycle

Command Description
add time schedule <schedule-name> for workflow <app-id.program-id> [version <app-version>] [description <description>] at <cron-expression> [concurrency <concurrency>] [properties <schedule-properties>] Adds a schedule which is associated with the program given
check service availability <app-id.service-id> [version <app-version>] Check if a service is available to accept requests
create app <app-id> [version <app-version>] <artifact-name> <artifact-version> <scope> [<app-config-file>] Creates an application from an artifact, optionally with a version. If the version is not given, a default version '-SNAPSHOT' will be used. A configuration is also optional. If a configuration is needed, it must be given as a file whose contents are a JSON object containing the application config. For example, the file contents could contain: '{ "config": { "stream": "purchases" } }'. In this case, the application would receive '{ "stream": "purchases" }' as its config object. Finally, an optional principal may be given.
delete app <app-id> [version <app-version>] Deletes an application with an optional version. If version is not provided, default version '-SNAPSHOT' will be used.
delete app preferences <app-id> Deletes the preferences of an application
delete flow preferences <app-id.flow-id> Deletes the preferences of a flow
delete instance preferences Deletes the preferences of an instance
delete mapreduce preferences <app-id.mapreduce-id> Deletes the preferences of a MapReduce program
delete namespace preferences Deletes the preferences of a namespace
delete preferences app <app-id> Deletes the preferences of an application. (Deprecated as of CDAP 4.1.0. Use delete app preferences <app-id> instead.)
delete preferences flow <app-id.flow-id> Deletes the preferences of a flow. (Deprecated as of CDAP 4.1.0. Use delete flow preferences <app-id.flow-id> instead.)
delete preferences instance Deletes the preferences of an instance. (Deprecated as of CDAP 4.1.0. Use delete instance preferences <instance-id> instead.)
delete preferences mapreduce <app-id.mapreduce-id> Deletes the preferences of a MapReduce program. (Deprecated as of CDAP 4.1.0. Use delete mapreduce preferences <app-id.mapreduce-id> instead.)
delete preferences namespace Deletes the preferences of a namespace. (Deprecated as of CDAP 4.1.0. Use delete namespace preferences <namespace-name> instead.)
delete preferences service <app-id.service-id> Deletes the preferences of a service. (Deprecated as of CDAP 4.1.0. Use delete service preferences <app-id.service-id> instead.)
delete preferences spark <app-id.spark-id> Deletes the preferences of a Spark program. (Deprecated as of CDAP 4.1.0. Use delete spark preferences <app-id.spark-id> instead.)
delete preferences worker <app-id.worker-id> Deletes the preferences of a worker. (Deprecated as of CDAP 4.1.0. Use delete worker preferences <app-id.worker-id> instead.)
delete preferences workflow <app-id.workflow-id> Deletes the preferences of a workflow. (Deprecated as of CDAP 4.1.0. Use delete workflow preferences <app-id.workflow-id> instead.)
delete schedule <app-id.schedule-id> Deletes a schedule
delete service preferences <app-id.service-id> Deletes the preferences of a service
delete spark preferences <app-id.spark-id> Deletes the preferences of a Spark program
delete worker preferences <app-id.worker-id> Deletes the preferences of a worker
delete workflow local datasets <app-id.workflow-id> <runid> Deletes the local datasets associated with the workflow for a given <runid>
delete workflow preferences <app-id.workflow-id> Deletes the preferences of a workflow
deploy app <app-jar-file> [<app-config>] Deploys an application, optionally with a serialized configuration string
deploy app <app-jar-file> with config <app-config-file> Deploys an application, optionally with a configuration file
describe app <app-id> [version <app-version>] Describes an application with an optional version. If version is not provided, default version '-SNAPSHOT' will be used.
get app <app-id> programs status [of type <program-types>] Command to get status of one or more programs of an application. By default, gets status of all flows, services, and workers. A comma-separated list of program types can be specified, which will get status of all programs of those types. For example, specifying 'flow,workflow' will get status of all flows and workflows in the application.
get app preferences <app-id> Gets the preferences of an application
get endpoints service <app-id.service-id> [version <app-version>] Lists the endpoints that a service exposes
get flow live <app-id.flow-id> Gets the live info of a flow
get flow logs <app-id.flow-id> [<start-time>] [<end-time>] Gets the logs of a flow
get flow preferences <app-id.flow-id> Gets the preferences of a flow
get flow runs <app-id.flow-id> [<status>] [<start-time>] [<end-time>] [<limit>] Gets the run history of a flow
get flow runtimeargs <app-id.flow-id> Gets the runtime arguments of a flow
get flow status <app-id.flow-id> Gets the status of a flow
get flowlet instances <app-id.flow-id.flowlet-id> Gets the number of instances of a flowlet
get instance preferences Gets the preferences of an instance
get mapreduce logs <app-id.mapreduce-id> [<start-time>] [<end-time>] Gets the logs of a MapReduce program
get mapreduce preferences <app-id.mapreduce-id> Gets the preferences of a MapReduce program
get mapreduce runs <app-id.mapreduce-id> [<status>] [<start-time>] [<end-time>] [<limit>] Gets the run history of a MapReduce program
get mapreduce runtimeargs <app-id.mapreduce-id> Gets the runtime arguments of a MapReduce program
get mapreduce status <app-id.mapreduce-id> Gets the status of a MapReduce program
get namespace preferences Gets the preferences of a namespace
get preferences app <app-id> Gets the preferences of an application. (Deprecated as of CDAP 4.1.0. Use get app preferences <app-id> instead.)
get preferences flow <app-id.flow-id> Gets the preferences of a flow. (Deprecated as of CDAP 4.1.0. Use get flow preferences <app-id.flow-id> instead.)
get preferences instance Gets the preferences of an instance. (Deprecated as of CDAP 4.1.0. Use get instance preferences instead.)
get preferences mapreduce <app-id.mapreduce-id> Gets the preferences of a MapReduce program. (Deprecated as of CDAP 4.1.0. Use get mapreduce preferences <app-id.mapreduce-id> instead.)
get preferences namespace Gets the preferences of a namespace. (Deprecated as of CDAP 4.1.0. Use get namespace preferences instead.)
get preferences service <app-id.service-id> Gets the preferences of a service. (Deprecated as of CDAP 4.1.0. Use get service preferences <app-id.service-id> instead.)
get preferences spark <app-id.spark-id> Gets the preferences of a Spark program. (Deprecated as of CDAP 4.1.0. Use get spark preferences <app-id.spark-id> instead.)
get preferences worker <app-id.worker-id> Gets the preferences of a worker. (Deprecated as of CDAP 4.1.0. Use get worker preferences <app-id.worker-id> instead.)
get preferences workflow <app-id.workflow-id> Gets the preferences of a workflow. (Deprecated as of CDAP 4.1.0. Use get workflow preferences <app-id.workflow-id> instead.)
get resolved app preferences <app-id> Gets the resolved preferences of an application
get resolved flow preferences <app-id.flow-id> Gets the resolved preferences of a flow
get resolved instance preferences Gets the resolved preferences of an instance
get resolved mapreduce preferences <app-id.mapreduce-id> Gets the resolved preferences of a MapReduce program
get resolved namespace preferences Gets the resolved preferences of a namespace
get resolved preferences app <app-id> Gets the resolved preferences of an application. (Deprecated as of CDAP 4.1.0. Use get resolved app preferences <app-id> instead.)
get resolved preferences flow <app-id.flow-id> Gets the resolved preferences of a flow. (Deprecated as of CDAP 4.1.0. Use get resolved flow preferences <app-id.flow-id> instead.)
get resolved preferences instance Gets the resolved preferences of an instance. (Deprecated as of CDAP 4.1.0. Use get resolved instance preferences instead.)
get resolved preferences mapreduce <app-id.mapreduce-id> Gets the resolved preferences of a MapReduce program. (Deprecated as of CDAP 4.1.0. Use get resolved mapreduce preferences <app-id.mapreduce-id> instead.)
get resolved preferences namespace Gets the resolved preferences of a namespace. (Deprecated as of CDAP 4.1.0. Use get resolved namespace preferences instead.)
get resolved preferences service <app-id.service-id> Gets the resolved preferences of a service. (Deprecated as of CDAP 4.1.0. Use get resolved service preferences <app-id.service-id> instead.)
get resolved preferences spark <app-id.spark-id> Gets the resolved preferences of a Spark program. (Deprecated as of CDAP 4.1.0. Use get resolved spark preferences <app-id.spark-id> instead.)
get resolved preferences worker <app-id.worker-id> Gets the resolved preferences of a worker. (Deprecated as of CDAP 4.1.0. Use get resolved worker preferences <app-id.worker-id> instead.)
get resolved preferences workflow <app-id.workflow-id> Gets the resolved preferences of a workflow. (Deprecated as of CDAP 4.1.0. Use get resolved workflow preferences <app-id.workflow-id> instead.)
get resolved service preferences <app-id.service-id> Gets the resolved preferences of a service
get resolved spark preferences <app-id.spark-id> Gets the resolved preferences of a Spark program
get resolved worker preferences <app-id.worker-id> Gets the resolved preferences of a worker
get resolved workflow preferences <app-id.workflow-id> Gets the resolved preferences of a workflow
get schedule status <app-id.schedule-id> Gets the status of a schedule
get service instances <app-id.service-id> Gets the number of instances of a service
get service preferences <app-id.service-id> Gets the preferences of a service
get service runs <app-id.service-id> [<status>] [<start-time>] [<end-time>] [<limit>] Gets the run history of a service
get service runtimeargs <app-id.service-id> Gets the runtime arguments of a service
get service status <app-id.service-id> Gets the status of a service
get spark logs <app-id.spark-id> [<start-time>] [<end-time>] Gets the logs of a Spark program
get spark preferences <app-id.spark-id> Gets the preferences of a Spark program
get spark runs <app-id.spark-id> [<status>] [<start-time>] [<end-time>] [<limit>] Gets the run history of a Spark program
get spark runtimeargs <app-id.spark-id> Gets the runtime arguments of a Spark program
get spark status <app-id.spark-id> Gets the status of a Spark program
get worker instances <app-id.worker-id> Gets the number of instances of a worker
get worker live <app-id.worker-id> Gets the live info of a worker
get worker logs <app-id.worker-id> [<start-time>] [<end-time>] Gets the logs of a worker
get worker preferences <app-id.worker-id> Gets the preferences of a worker
get worker runs <app-id.worker-id> [<status>] [<start-time>] [<end-time>] [<limit>] Gets the run history of a worker
get worker runtimeargs <app-id.worker-id> Gets the runtime arguments of a worker
get worker status <app-id.worker-id> Gets the status of a worker
get workflow current <app-id.workflow-id> <runid> Gets the currently running nodes of a workflow for a given <runid>
get workflow local datasets <app-id.workflow-id> <runid> Gets the local datasets associated with the workflow for a given <runid>
get workflow logs <app-id.workflow-id> [<start-time>] [<end-time>] Gets the logs of a workflow
get workflow preferences <app-id.workflow-id> Gets the preferences of a workflow
get workflow runs <app-id.workflow-id> [<status>] [<start-time>] [<end-time>] [<limit>] Gets the run history of a workflow
get workflow runtimeargs <app-id.workflow-id> Gets the runtime arguments of a workflow
get workflow schedules <app-id.workflow-id> Gets schedules of a workflow
get workflow state <app-id.workflow-id> <runid> Gets the state of all nodes associated with the workflow for a given <runid>
get workflow status <app-id.workflow-id> Gets the status of a workflow
get workflow token <app-id.workflow-id> <runid> [at node <workflow-node>] [scope <workflow-token-scope>] [key <workflow-token-key>] Gets the workflow token of a workflow for a given <runid>
list app versions <app-id> Lists all versions of a specific application
list apps [<artifact-name>] [<artifact-version>] Lists all applications, optionally filtered by artifact name and version
list flows Lists all flows
list mapreduce Lists all MapReduce programs
list programs Lists all programs
list services Lists all services
list spark Lists all Spark programs
list workers Lists all workers
list workflows Lists all workflows
load app preferences <app-id> <local-file-path> <content-type> Sets the preferences of an application from a local JSON config file
load flow preferences <app-id.flow-id> <local-file-path> <content-type> Sets the preferences of a flow from a local JSON config file
load instance preferences <local-file-path> <content-type> Sets the preferences of an instance from a local JSON config file
load mapreduce preferences <app-id.mapreduce-id> <local-file-path> <content-type> Sets the preferences of a MapReduce program from a local JSON config file
load namespace preferences <local-file-path> <content-type> Sets the preferences of a namespace from a local JSON config file
load preferences app <local-file-path> <content-type> <app-id> Sets the preferences of an application from a local JSON config file. (Deprecated as of CDAP 4.1.0. Use load app preferences <app-id> <local-file-path> <content-type> instead.)
load preferences flow <local-file-path> <content-type> <app-id.flow-id> Sets the preferences of a flow from a local JSON config file. (Deprecated as of CDAP 4.1.0. Use load flow preferences <app-id.flow-id> <local-file-path> <content-type> instead.)
load preferences instance <local-file-path> <content-type> Sets the preferences of an instance from a local JSON config file. (Deprecated as of CDAP 4.1.0. Use load instance preferences <local-file-path> <content-type> instead.)
load preferences mapreduce <local-file-path> <content-type> <app-id.mapreduce-id> Sets the preferences of a MapReduce program from a local JSON config file. (Deprecated as of CDAP 4.1.0. Use load mapreduce preferences <app-id.mapreduce-id> <local-file-path> <content-type> instead.)
load preferences namespace <local-file-path> <content-type> Sets the preferences of a namespace from a local JSON config file. (Deprecated as of CDAP 4.1.0. Use load namespace preferences <local-file-path> <content-type> instead.)
load preferences service <local-file-path> <content-type> <app-id.service-id> Sets the preferences of a service from a local JSON config file. (Deprecated as of CDAP 4.1.0. Use load service preferences <app-id.service-id> <local-file-path> <content-type> instead.)
load preferences spark <local-file-path> <content-type> <app-id.spark-id> Sets the preferences of a Spark program from a local JSON config file. (Deprecated as of CDAP 4.1.0. Use load spark preferences <app-id.spark-id> <local-file-path> <content-type> instead.)
load preferences worker <local-file-path> <content-type> <app-id.worker-id> Sets the preferences of a worker from a local JSON config file. (Deprecated as of CDAP 4.1.0. Use load worker preferences <app-id.worker-id> <local-file-path> <content-type> instead.)
load preferences workflow <local-file-path> <content-type> <app-id.workflow-id> Sets the preferences of a workflow from a local JSON config file. (Deprecated as of CDAP 4.1.0. Use load workflow preferences <app-id.workflow-id> <local-file-path> <content-type> instead.)
load service preferences <app-id.service-id> <local-file-path> <content-type> Sets the preferences of a service from a local JSON config file
load spark preferences <app-id.spark-id> <local-file-path> <content-type> Sets the preferences of a Spark program from a local JSON config file
load worker preferences <app-id.worker-id> <local-file-path> <content-type> Sets the preferences of a worker from a local JSON config file
load workflow preferences <app-id.workflow-id> <local-file-path> <content-type> Sets the preferences of a workflow from a local JSON config file
restart app <app-id> programs [of type <program-types>] Command to restart one or more programs of an application. By default, restarts all flows, services, and workers. A comma-separated list of program types can be specified, which will restart all programs of those types. For example, specifying 'flow,workflow' will restart all flows and workflows in the application.
resume schedule <app-id.schedule-id> Resumes a schedule
set app preferences <app-id> <preferences> Sets the preferences of an application. <preferences> is specified in the format 'key1=v1 key2=v2'.
set flow preferences <app-id.flow-id> <preferences> Sets the preferences of a flow. <preferences> is specified in the format 'key1=v1 key2=v2'.
set flow runtimeargs <app-id.flow-id> <runtime-args> Sets the runtime arguments of a flow. <runtime-args> is specified in the format 'key1=v1 key2=v2'.
set flowlet instances <app-id.flow-id.flowlet-id> <num-instances> Sets the number of instances of a flowlet
set instance preferences <preferences> Sets the preferences of an instance. <preferences> is specified in the format 'key1=v1 key2=v2'.
set mapreduce preferences <app-id.mapreduce-id> <preferences> Sets the preferences of a MapReduce program. <preferences> is specified in the format 'key1=v1 key2=v2'.
set mapreduce runtimeargs <app-id.mapreduce-id> <runtime-args> Sets the runtime arguments of a MapReduce program. <runtime-args> is specified in the format 'key1=v1 key2=v2'.
set namespace preferences <preferences> Sets the preferences of a namespace. <preferences> is specified in the format 'key1=v1 key2=v2'.
set preferences app <runtime-args> <app-id> Sets the preferences of an application. <runtime-args> is specified in the format 'key1=v1 key2=v2'. (Deprecated as of CDAP 4.1.0. Use set app preferences <app-id> <preferences> instead.)
set preferences flow <runtime-args> <app-id.flow-id> Sets the preferences of a flow. <runtime-args> is specified in the format 'key1=v1 key2=v2'. (Deprecated as of CDAP 4.1.0. Use set flow preferences <app-id.flow-id> <preferences> instead.)
set preferences instance <runtime-args> Sets the preferences of an instance. <runtime-args> is specified in the format 'key1=v1 key2=v2'. (Deprecated as of CDAP 4.1.0. Use set instance preferences <preferences> instead.)
set preferences mapreduce <runtime-args> <app-id.mapreduce-id> Sets the preferences of a MapReduce program. <runtime-args> is specified in the format 'key1=v1 key2=v2'. (Deprecated as of CDAP 4.1.0. Use set mapreduce preferences <app-id.mapreduce-id> <preferences> instead.)
set preferences namespace <runtime-args> Sets the preferences of a namespace. <runtime-args> is specified in the format 'key1=v1 key2=v2'. (Deprecated as of CDAP 4.1.0. Use set namespace preferences <preferences> instead.)
set preferences service <runtime-args> <app-id.service-id> Sets the preferences of a service. <runtime-args> is specified in the format 'key1=v1 key2=v2'. (Deprecated as of CDAP 4.1.0. Use set service preferences <app-id.service-id> <preferences> instead.)
set preferences spark <runtime-args> <app-id.spark-id> Sets the preferences of a Spark program. <runtime-args> is specified in the format 'key1=v1 key2=v2'. (Deprecated as of CDAP 4.1.0. Use set spark preferences <app-id.spark-id> <preferences> instead.)
set preferences worker <runtime-args> <app-id.worker-id> Sets the preferences of a worker. <runtime-args> is specified in the format 'key1=v1 key2=v2'. (Deprecated as of CDAP 4.1.0. Use set worker preferences <app-id.worker-id> <preferences> instead.)
set preferences workflow <runtime-args> <app-id.workflow-id> Sets the preferences of a workflow. <runtime-args> is specified in the format 'key1=v1 key2=v2'. (Deprecated as of CDAP 4.1.0. Use set workflow preferences <app-id.workflow-id> <preferences> instead.)
set service instances <app-id.service-id> <num-instances> Sets the number of instances of a service
set service preferences <app-id.service-id> <preferences> Sets the preferences of a service. <preferences> is specified in the format 'key1=v1 key2=v2'.
set service runtimeargs <app-id.service-id> <runtime-args> Sets the runtime arguments of a service. <runtime-args> is specified in the format 'key1=v1 key2=v2'.
set spark preferences <app-id.spark-id> <preferences> Sets the preferences of a Spark program. <preferences> is specified in the format 'key1=v1 key2=v2'.
set spark runtimeargs <app-id.spark-id> <runtime-args> Sets the runtime arguments of a Spark program. <runtime-args> is specified in the format 'key1=v1 key2=v2'.
set worker instances <app-id.worker-id> <num-instances> Sets the number of instances of a worker
set worker preferences <app-id.worker-id> <preferences> Sets the preferences of a worker. <preferences> is specified in the format 'key1=v1 key2=v2'.
set worker runtimeargs <app-id.worker-id> <runtime-args> Sets the runtime arguments of a worker. <runtime-args> is specified in the format 'key1=v1 key2=v2'.
set workflow preferences <app-id.workflow-id> <preferences> Sets the preferences of a workflow. <preferences> is specified in the format 'key1=v1 key2=v2'.
set workflow runtimeargs <app-id.workflow-id> <runtime-args> Sets the runtime arguments of a workflow. <runtime-args> is specified in the format 'key1=v1 key2=v2'.
start app <app-id> programs [of type <program-types>] Command to start one or more programs of an application. By default, starts all flows, services, and workers. A comma-separated list of program types can be specified, which will start all programs of those types. For example, specifying 'flow,workflow' will start all flows and workflows in the application.
start flow <app-id.flow-id> [version <app-version>] [<runtime-args>] Starts a flow. <runtime-args> is specified in the format 'key1=a key2=b'.
start mapreduce <app-id.mapreduce-id> [version <app-version>] [<runtime-args>] Starts a MapReduce program. <runtime-args> is specified in the format 'key1=a key2=b'.
start service <app-id.service-id> [version <app-version>] [<runtime-args>] Starts a service. <runtime-args> is specified in the format 'key1=a key2=b'.
start spark <app-id.spark-id> [version <app-version>] [<runtime-args>] Starts a Spark program. <runtime-args> is specified in the format 'key1=a key2=b'.
start worker <app-id.worker-id> [version <app-version>] [<runtime-args>] Starts a worker. <runtime-args> is specified in the format 'key1=a key2=b'.
start workflow <app-id.workflow-id> [version <app-version>] [<runtime-args>] Starts a workflow. <runtime-args> is specified in the format 'key1=a key2=b'.
start-debug flow <app-id.flow-id> [<runtime-args>] Starts a flow in debug mode. <runtime-args> is specified in the format 'key1=a key2=b'.
start-debug mapreduce <app-id.mapreduce-id> [<runtime-args>] Starts a MapReduce program in debug mode. <runtime-args> is specified in the format 'key1=a key2=b'.
start-debug service <app-id.service-id> [<runtime-args>] Starts a service in debug mode. <runtime-args> is specified in the format 'key1=a key2=b'.
start-debug spark <app-id.spark-id> [<runtime-args>] Starts a Spark program in debug mode. <runtime-args> is specified in the format 'key1=a key2=b'.
start-debug worker <app-id.worker-id> [<runtime-args>] Starts a worker in debug mode. <runtime-args> is specified in the format 'key1=a key2=b'.
start-debug workflow <app-id.workflow-id> [<runtime-args>] Starts a workflow in debug mode. <runtime-args> is specified in the format 'key1=a key2=b'.
stop app <app-id> programs [of type <program-types>] Command to stop one or more programs of an application. By default, stops all flows, services, and workers. A comma-separated list of program types can be specified, which will stop all programs of those types. For example, specifying 'flow,workflow' will stop all flows and workflows in the application.
stop flow <app-id.flow-id> [version <app-version>] Stops a flow
stop mapreduce <app-id.mapreduce-id> [version <app-version>] Stops a MapReduce program
stop service <app-id.service-id> [version <app-version>] Stops a service
stop spark <app-id.spark-id> [version <app-version>] Stops a Spark program
stop worker <app-id.worker-id> [version <app-version>] Stops a worker
stop workflow <app-id.workflow-id> [version <app-version>] Stops a workflow
suspend schedule <app-id.schedule-id> Suspends a schedule
update app <app-id> <artifact-name> <artifact-version> <scope> [<app-config-file>] Updates an application to use another artifact version and/or configuration
update time schedule <schedule-name> for workflow <app-id.program-id> [version <app-version>] [description <description>] at <cron-expression> [concurrency <concurrency>] [properties <schedule-properties>] Updates a schedule which is associated with the program given

šŸ”—Artifact

Command Description
delete artifact <artifact-name> <artifact-version> Deletes an artifact
describe artifact <artifact-name> <artifact-version> [<scope>] Describes an artifact, including information about the application and plugin classes contained in the artifact. If no scope is provided, the artifact is looked for first in the 'SYSTEM' and then in the 'USER' scope.
describe artifact-plugin <artifact-name> <artifact-version> <plugin-type> <plugin-name> [<scope>] Describes a plugin of a specific type and name available to a specific artifact. Can return multiple details if there are multiple versions of the plugin. If no scope is provided, plugins are looked for first in the 'SYSTEM' and then in the 'USER' scope.
get artifact properties <artifact-name> <artifact-version> [<scope>] Gets the properties of an artifact. If no scope is provided, properties are looked for first in the 'SYSTEM' and then in the 'USER' scope.
list artifact plugin-types <artifact-name> <artifact-version> [<scope>] Lists all plugin types usable by the specified artifact. If no scope is provided, artifacts are looked for first in the 'SYSTEM' and then in the 'USER' scope.
list artifact plugins <artifact-name> <artifact-version> <plugin-type> [<scope>] Lists all plugins of a specific type available to a specific artifact. Returns the type, name, classname, and description of the plugin, as well as the artifact the plugin came from. If no scope is provided, artifacts are looked for first in the 'SYSTEM' and then in the 'USER' scope.
list artifact versions <artifact-name> [<scope>] Lists all versions of a specific artifact. If no scope is provided, artifacts are looked for first in the 'SYSTEM' and then in the 'USER' scope.
list artifacts [<scope>] Lists all artifacts. If no scope is provided, artifacts in all scopes are returned. Otherwise, only artifacts in the specified scope are returned.
load artifact <local-file-path> [config-file <artifact-config>] [name <artifact-name>] [version <artifact-version>]

Loads an artifact into CDAP. If the artifact name and version are not both given, they will be derived from the filename of the artifact. File names are expected to be of the form <name>-<version>.jar. If the artifact contains plugins that extend another artifact, or if it contains third-party plugins, a config file must be provided. The config file must contain a JSON object that specifies the parent artifacts and any third-party plugins in the JAR.

For example, if there is a config file with these contents:

{
"parents":[ "app1[1.0.0,2.0.0)", "app2[1.2.0,1.3.0] ],
"plugins":[
{ "type": "jdbc",
"name": "mysql",
"className": "com.mysql.jdbc.Driver"
}
],
"properties":{
"prop1": "val1"
}
}

This config specifies that the artifact contains one JDBC third-party plugin that should be available to the 'app1' artifact (versions 1.0.0 inclusive to 2.0.0 exclusive) and 'app2' artifact (versions 1.2.0 inclusive to 1.3.0 inclusive). The config may also include a 'properties' field specifying properties for the artifact.

set artifact properties <artifact-name> <artifact-version> <scope> <local-file-path> Sets properties of an artifact. The properties file must contain a JSON object with a 'properties' key whose value is a JSON object of the properties for the artifact.

šŸ”—Dataset

Command Description
create dataset instance <dataset-type> <new-dataset-name> [<dataset-properties>] [<dataset-description>] [principal <principal>] Creates a dataset instance of the specified dataset-type. Can optionally take dataset-properties, dataset-description, or principal where <dataset-properties> is in the format 'key1=val1 key2=val2' and <principal> is the Kerberos principal of the owner of the dataset.
delete dataset instance <dataset-name> Deletes a dataset
delete dataset module <dataset-module> Deletes a dataset module
deploy dataset module <new-dataset-module> <module-jar-file> <module-jar-classname> Deploys a dataset module
describe dataset instance <dataset-name> Describes a dataset
describe dataset module <dataset-module> Describes a dataset module
describe dataset type <dataset-type> Describes a dataset type
get dataset instance properties <dataset-name> Gets the properties used to create or update a dataset
list dataset instances Lists all datasets
list dataset modules Lists all dataset modules
list dataset types Lists all dataset types
set dataset instance properties <dataset-name> <dataset-properties> Sets properties for a dataset. <dataset-properties> is in the format 'key1=val1 key2=val2'.
truncate dataset instance <dataset-name> Truncates a dataset

šŸ”—Egress

Command Description
call service <app-id.service-id> [version <app-version>] <http-method> <endpoint> [headers <headers>] [body <body>] [body:file <local-file-path>] Calls a service endpoint. The <headers> are formatted as '{"key":"value", ...}'. The request body may be provided as either a string or a file. To provide the body as a string, use 'body <body>. To provide the body as a file, use 'body:file <local-file-path>.

šŸ”—Explore

Command Description
execute <query> [<timeout>] Executes a query with optional <timeout> in minutes (default is no timeout)

šŸ”—Ingest

Command Description
create stream <new-stream-id> [<local-file-path>] Creates a stream
create stream-view <stream-id> <view-id> format <format> [schema <schema>] [settings <settings>] Creates or updates a stream-view. A valid <format> is one of 'avro', 'csv', 'tsv', 'text', 'clf', 'grok', 'syslog'. A <schema> is an SQL-like schema 'column_name data_type, ...' or an Avro-like JSON schema. A <settings> is specified in the format 'key1=v1 key2=v2'.
delete stream <stream-id> Deletes a stream
delete stream-view <stream-id> <view-id> Deletes a stream-view
describe stream <stream-id> Describes a stream
describe stream-view <stream-id> <view-id> Describes a stream-view
get stream <stream-id> [<start-time>] [<end-time>] [<limit>] Gets events from a stream. The time format for <start-time> and <end-time> can be a timestamp in milliseconds or a relative time in the form of '[+|-][0-9][d|h|m|s]'. <start-time> is relative to current time; <end-time> is relative to <start-time>. Special constants 'min' and 'max' can be used to represent '0' and 'max timestamp' respectively.
get stream-stats <stream-id> [limit <limit>] [start <start-time>] [end <end-time>] Gets statistics for a stream. The <limit> limits how many stream events to analyze; default is 100. The time format for <start-time> and <end-time> can be a timestamp in milliseconds or a relative time in the form of '[+|-][0-9][d|h|m|s]'. <start-time> is relative to current time; <end-time> is relative to <start-time>. Special constants 'min' and 'max' can be used to represent '0' and 'max timestamp' respectively.
list stream-views <stream-id> Lists all stream-views
list streams Lists all streams
load stream <stream-id> <local-file-path> [<content-type>] Loads a file to a stream. The contents of the file will become multiple events in the stream, based on the content type ('avro/binary', 'text/csv', 'text/plain', 'text/tsv'). If <content-type> is not provided, it will be detected by the file extension. Supported file extensions: 'avro', 'csv', 'log', 'tsv', 'txt'.
send stream <stream-id> <stream-event> Sends an event to a stream
set stream description <stream-id> <stream-description> Sets the description of a stream
set stream format <stream-id> <format> [<schema>] [<settings>] Sets the format of a stream. A valid <format> is one of 'avro', 'csv', 'tsv', 'text', 'clf', 'grok', 'syslog'. A <schema> is an SQL-like schema 'column_name data_type, ...' or an Avro-like JSON schema. A <settings> is specified in the format 'key1=v1 key2=v2'.
set stream notification-threshold <stream-id> <notification-threshold-mb> Sets the notification threshold of a stream
set stream properties <stream-id> <local-file-path> Sets the properties of a stream, such as the time-to-live (TTL), format, and notification threshold
set stream ttl <stream-id> <ttl-in-seconds> Sets the time-to-live (TTL) of a stream
truncate stream <stream-id> Truncates a stream

šŸ”—Metadata and Lineage

Command Description
add metadata-properties <entity> <properties>

Adds metadata properties for an entity. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

add metadata-tags <entity> <tags>

Adds metadata tags for an entity. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

get lineage dataset <dataset-name> [start <start>] [end <end>] [levels <levels>] Gets the lineage of a dataset
get lineage stream <stream-id> [start <start>] [end <end>] [levels <levels>] Gets the lineage of a stream
get metadata <entity> [scope <scope>]

Gets the metadata of an entity. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

get metadata-properties <entity> [scope <scope>]

Gets the metadata properties of an entity. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

get metadata-tags <entity> [scope <scope>]

Gets the metadata tags of an entity. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

remove metadata <entity>

Removes metadata for an entity. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

remove metadata-properties <entity>

Removes all metadata properties for an entity. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

remove metadata-property <entity> <property>

Removes a specific metadata property for an entity. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

remove metadata-tag <entity> <tag>

Removes a specific metadata tag for an entity. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

remove metadata-tags <entity>

Removes all metadata tags for an entity. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

search metadata <search-query> [filtered by target-type <target-type>] Searches CDAP entities based on the metadata annotated on them. The search can be restricted by adding a comma-separated list of target types: 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

šŸ”—Metrics

Command Description
get metric value <metric-name> [<tags>] [start <start>] [end <end>] Gets the value of a metric. Provide <tags> as a map in the format 'tag1=value1 tag2=value2'.
search metric names [<tags>] Searches metric names. Provide <tags> as a map in the format 'tag1=value1 tag2=value2'.
search metric tags [<tags>] Searches metric tags. Provide <tags> as a map in the format 'tag1=value1 tag2=value2'.

šŸ”—Namespace

Command Description
create namespace <namespace-name> [description <description>] [principal <principal>] [group-name <group-name>] [keytab-URI <keytab-URI>] [hbase-namespace <hbase-namespace>] [hive-database <hive-database>] [root-directory <root-directory>] [scheduler-queue-name <scheduler-queue-name>] [explore-as-principal <explore-as-principal>] Creates a namespace in CDAP
delete namespace <namespace-name> Deletes a namespace
describe namespace <namespace-name> Describes a namespace
list namespaces Lists all namespaces
use namespace <namespace-name> Changes the current namespace to <namespace-name>

šŸ”—Security

Command Description
add role <role-name> to <principal-type> <principal-name> Adds a role to a principal in authorization system for role-based access control
create role <role-name> Creates a role in authorization system for role-based access control
drop role <role-name> Drops a role from authorization system for role-based access control
grant actions <actions> on entity <entity> to <principal-type> <principal-name>

Grants a principal privileges to perform certain actions on an entity. <actions> is a comma-separated list of privileges, any of 'READ', 'WRITE', 'EXECUTE', or 'ADMIN'. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'namespace', 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For namespaces, <entity-id> is composed from the namespace, such as 'namespace:<namespace-name>.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

list privileges for <principal-type> <principal-name> Lists privileges for a principal
list roles [for <principal-type> <principal-name>] Lists all roles, optionally for a particular principal in an authorization system for role-based access control
remove role <role-name> from <principal-type> <principal-name> Removes a role from a principal in authorization system for role-based access control
revoke actions <actions> on entity <entity> from <principal-type> <principal-name>

Revokes a principal's privileges to perform certain actions on an entity. <actions> is a comma-separated list of privileges, any of 'READ', 'WRITE', 'EXECUTE', or 'ADMIN'. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'namespace', 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For namespaces, <entity-id> is composed from the namespace, such as 'namespace:<namespace-name>.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.

revoke all on entity <entity>

Revokes all privileges for all users on the entity. <entity> is of the form <entity-type>:<entity-id>, where <entity-type> is one of 'namespace', 'artifact', 'app', 'dataset', 'program', 'stream', or 'view'.

For namespaces, <entity-id> is composed from the namespace, such as 'namespace:<namespace-name>.

For artifacts and apps, <entity-id> is composed of the namespace, entity name, and version, such as <namespace-name>.<artifact-name>.<artifact-version> or <namespace-name>.<app-name>.<app-version>.

For programs, <entity-id> includes the application name and the program type: <namespace-name>.<app-name>.<program-type>.<program-name>. <program-type> is one of flow, mapreduce, service, spark, worker, or workflow.

For datasets and streams, <entity-id> is the namespace and entity names, such as <namespace-name>.<dataset-name> or <namespace-name>.<stream-name>.

For (stream) views, <entity-id> includes the stream that they were created from: <namespace-name>.<stream-name>.<view-name>.