WhereScape RED provides a dedicated command line interface called REDCLI which enables you to perform command functions. The REDCLI tool is available in the RED Windows installation directory. This tool can be called from 3rd party applications or Windows scripting languages to perform common functions.
REDCLI provides three usage modes:
Mode | Description |
---|---|
Standard | In this mode, one action is run, and you authenticate to the RED repository for each action. The use case for this mode is if you only have one action to perform, e.g. deploying an application. |
Interactive | In this mode, you connect to the target RED repository once and have a persistent connection to run multiple REDCLI actions. If you have several commands to run, using this mode removes the overhead of several database connections and reduces the command line options required for each action by not requiring the meta connection and logging options that were established on the initial interactive command line. This mode might be useful in cases where you have multiple actions to perform but have not prepared a batch file. |
Batch | In this mode, you have a file containing a series of REDCLI actions that are executed sequentially. One use case is loading an enablement pack of templates, data type mapping sets, and database function sets. This is particularly useful if you want to repeat a set of actions in multiple RED repositories. |
A command line help for each command within the REDCLI is available and the option-level actions are as follows:
Command | Description |
---|---|
batch | Execute a batch of commands and generate an empty batch file. |
connection | Manage all aspects of connections. |
dfs | Manage all aspects of database function sets. |
dtm | Manage all aspects of data type mapping sets. |
deployment | List, deploy and show the contents of deployment applications. |
deployment-options | Load/save deployment options from/to XML and the registry. Defaults can also be generated. |
enablement-pack | Install and list-dir Enablement Packs. |
ext-prop-definition | Manage all aspects of extended property definitions. |
ext-prop-value | Manage all aspects of extended property values. |
external-scheduler | Manage inserting, updating, and deleting external scheduler rows. |
script-lang-definition | Manage all aspects of host script language definitions. |
interactive | Collect commands interactively from standard input and execute them. |
license | Install, uninstall or show a license. |
object | List information and generate update routines for objects in a metadata repository. The REDCLI command 'object generate-routine' works in conjunction with the Generate load scripts and update routine for objects setting in the Load Application > Metadata Options window of the RED Setup Administrator. Refer to the section Application Load Process of the RED Install Guide for details. The default template for the table objects must be set in the target connection, before generating update routines via REDCLI. Refer to Connection Properties and Connection Routine Templates for details. Template-based update routine code generation for table objects:
|
object-type-definition | Import, export, delete, and list all object type definitions. |
odbc | List and validate ODBC DSNs in the system. |
options | List, find, import and export Tools Options. |
parameter | Manage all aspects of parameters. |
powershell | Install WhereScape specific PowerShell modules. |
python | Install WhereScape specific Python modules. |
procedure | Import, export and list all procedures. |
red-user | List all users |
repository | Create, upgrade and validate a metadata repository. |
scheduler | Manage all aspects of scheduler configurations. |
script | Import, export and list all scripts. |
target | Manage all aspects of targets. |
template | Import, export and list all templates. |
user-preferences | List, find, import and export Tools User Preferences. |
ui-config | Import, export, list-all, show, and delete UI Configurations |
Each command has its help, for example, 'RedCli deployment --help' lists all available commands relevant to deployment applications.
Example to deploy a RED application:
REDCLI deployment deploy --app-number myproject --app-version v01 --app-directory C:\Workspace\RedCli\Applications\ --options-location defaults --dest-connection-name DataWarehouse --dest-target-name Schema --dest-scheduler-name qa_scheduler --continue-ver-mismatch --meta-database orcl12_ODW --meta-dsn ORCL-orcl12_ODW --meta-password Wsl12345 --meta-user-name orcl12_ODW --output-mode json --log-level 5