dhconfig schemas
The schemas
configuration data type of the dhconfig tool is used to manage schemas in the system, with actions import
, export
, list
, and delete
.
dhconfig schemas [import|export|list|delete|help] [arguments]
As with other dhconfig
configuration data types, the --help
argument provides detailed information on the available actions and arguments, as well as usage examples. Use --help
whenever you need more information about the available actions. For example, if you want information about the import
action, you can run:
dhconfig schemas import --help
Which prints the following:
usage: dhconfig schemas import [--compile | --no-compile] [--configfile <arg>] [-d <arg>] [--diskprops] [-e] [--etcd]
[-f <arg>] [-force] [-h] [-k <arg> | -user <arg>] [-l] [-n <arg>] [-pf <arg>] [-s <arg>] [-u] [-v]
Import schemas from disk.
...followed by a description of all of the subcommand's arguments and some usage examples.
Due to the number of available actions and combinations, and the robust in-tool documentation via --help
, an exhaustive list of all possible commands is not provided here. Instead, we will elaborate on some of the more complex arguments below, and then give some usage examples. We recommend that you use the --help
argument as needed for more information.
Arguments
Argument | Description |
---|---|
-s,--namespaceset <arg> | Limit processing to this namespace set (User or System). Can be specified multiple times. |
-e,--skip-errors | Attempt to process all eligible schemas, even when errors are encountered. If omitted, processing stops at the first error. |
-l,--lenient-validation | It is possible that classes used in a schema are not available when reading a schema. This is a fatal error unless this option is specified. Validation can be disabled entirely by setting the property SchemaXmlParser.disableValidation=true . |
--no-compile | Do not compile listeners while importing a schema. This can be used to import schemas with apparent errors. Use with care: if the Data Import Server cannot compile the listeners, data cannot be ingested. |
-o,--operate-on-namespace | Operate on a namespace instead of a schema. |
import
Note
Import actions require authentication, with sudo
, --key
, or --user
.
Deploy a (new) single schema:
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig schemas import --file /tmp/schemas/LearnDeephaven.StockQuotes.schema
Deploy a (new) single schema, skipping all data validation (use with care):
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig schemas import --file /tmp/schemas/LearnDeephaven.StockQuotes.schema --no-compile --lenient
Deploy a (new) single schema directly to etcd, bypassing the configuration server:
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig schemas import --etcd --file /tmp/schemas/LearnDeephaven.StockQuotes.schema
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig schemas import --etcd /tmp/schemas/LearnDeephaven.StockQuotes.schema
Re-deploy the ExampleNamespace
schemas:
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig schemas import --directory /tmp/schemas --namespace ExampleNamespace --force
export
Export all schemas in namespace DbInternal
to /tmp/schemas
:
/usr/illumon/latest/bin/dhconfig schemas export --namespace DbInternal --directory /tmp/schemas
Print a schema to stdout
:
/usr/illumon/latest/bin/dhconfig schemas export DbInternal.ProcessEventLog
list
List all namespaces:
/usr/illumon/latest/bin/dhconfig schemas list --operate-on-namespace
List all schemas in namespace DbInternal
:
/usr/illumon/latest/bin/dhconfig schemas list --namespace DbInternal
List all System schemas, bypassing configuration server (requires more file permissions):
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig schemas list --namespaceset System --etcd
delete
Note
Delete actions require authentication, with sudo
, --key
, or --user
.
Delete MyTable1
and MyTable2
from namespace MyNamespace
:
/usr/illumon/latest/bin/dhconfig schemas delete --file MyNamespace.MyTable1 --file MyNamespace.MyTable2 --force --user some-admin-user --pwfile ~/pw.txt
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig schemas delete MyNamespace.MyTable1 MyNamespace.MyTable2 --force
Delete namespace MyNamespace
:
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig schemas delete --operate-on-namespace MyNamespace --force