wx-data database create

Add or create a new database.

Syntax

cpd-cli wx-data database
create \
--display-name=<environment-display-name> \
--type=<environment-type> \ 
[--associated-catalog=<associated-catalog> | --associated-catalog-catalog-name=<associated-catalog-catalog-name>] \
[--associated-catalog-catalog-tags=<associated-catalog-catalog-tags>] \
[--associated-catalog-catalog-type=<associated-catalog-catalog-type>] \
[--created-on=<created-on>] \
[--database-details=<placeholder-text> | --database-details-authentication-type=<placeholder-text>] \
[--database-details-authentication-value=<placeholder-text>] \
[--database-details-broker-authentication-password=<placeholder-text>] \
[--database-details-broker-authentication-type=<placeholder-text>] \ 
[--database-details-broker-authentication-user=<placeholder-text>] \
[--database-details-broker-host=<placeholder-text>] \ 
[--database-details-broker-port=<placeholder-text>] \
[--database-details-certificate=<placeholder-text>] \
[--database-details-certificate-extension=<placeholder-text>] \
[--database-details-connection-method=<placeholder-text>] \
[--database-details-connection-mode=<placeholder-text>] \
[--database-details-connection-mode-value=<placeholder-text>] \ 
[--database-details-connection-type=<placeholder-text>] \
[--database-details-controller-authentication-password=<placeholder-text>] \
[--database-details-controller-authentication-type=<placeholder-text>] \
[--database-details-controller-authentication-user=<placeholder-text>] \
[--database-details-coordinator-host=<placeholder-text>] \
[--database-details-coordinator-port=<placeholder-text>] \
[--database-details-cpd-hostname=<placeholder-text>] \
[--database-details-credentials-key=<placeholder-text>] \
[--database-details-database-name=<placeholder-text>] \  
[--database-details-hostname=<placeholder-text>= \]
[--database-details-hostname-in-certificate=<placeholder-text>] \
[--database-details-hosts=<placeholder-text>] \
[--database-details-informix-server=<placeholder-text>] \
[--database-details-password=<placeholder-text>] \
[--database-details-port=<placeholder-text>] \ 
[--database-details-project-id=<placeholder-text>] \
[--database-details-sasl=true|false]\
[--database-details-sasl-mechanism=<placeholder-text>] \ 
[--database-details-service-api-key=<placeholder-text>] \
[--database-details-service-hostname=<placeholder-text>] \
[--database-details-service-password=<placeholder-text>] \ 
[--database-details-service-port=<placeholder-text>] \ 
[--database-details-service-ssl=true|false] \ 
[--database-details-service-token-url=<placeholder-text>] \
[--database-details-service-username=<placeholder-text>] \
[--database-details-ssl=true|false] \
[--database-details-tables=<placeholder-text>] \ 
[--database-details-username=<placeholder-text>] \
[--database-details-validate-server-certificate=true|false] \
[--database-details-verify-host-name=true|false] \
[--database-properties=<placeholder-text>] \
[--description=<description>] \
[--instance-id=<instance-id>] \
[--tags=<tag1,tag2,...>] 

Options

Table 1: Command options
Option Description
--associated-catalog Bucket catalog object that includes catalog name, catalog tags, and catalog type.
Status
Optional.
Syntax
--associated-catalog=<associated-catalog>
Input
string
Default value
No default.
--associated-catalog-catalog-name Bucket catalog object that includes catalog name, catalog tags, and catalog type.
Status
Optional.
Syntax
--associated-catalog-catalog-name=<associated-catalog-catalog-name>
Input
string
Default value
No default.
--associated-catalog-catalog-tags Catalog tags. This option provides a value for a sub-field of the JSON option associated-catalog. The associated-catalog-catalog-tags option is mutually exclusive with the associated-catalog option.
Status
Optional.
Syntax
--associated-catalog-catalog-tags=<associated-catalog-catalog-tags>
Input
string
Default value
No default.
--associated-catalog-catalog-type Catalog type. This option provides a value for a sub-field of the JSON option associated-catalog. The associated-catalog-catalog-type option is mutually exclusive with the associated-catalog-catalog-type option.
Status
Optional.
Syntax
--associated-catalog-catalog-type=<associated-catalog-catalog-type>
Input
string
Default value
No default.
--created-on Created on.
Status
Optional.
Syntax
--created-on=<created-on>
Input
string
Default value
Not applicable.
--database-details Database details. This JSON option can instead be provided by setting individual fields with other options. It is mutually exclusive with those options.
Status
Optional.
Syntax
--database-details=<placeholder-text>
Input
string
Default value
No default.
Valid values
Provide a JSON string option or specify a JSON file to read from by providing a file path option that begins with a @. For example, -database-details=@path/to/file.json.
--database-details-authentication-type Authentication method. This option provides a value for a sub-field of the JSON option 'database-details'. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-authentication-type=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-authentication-value Authentication method. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-authentication-value=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-broker-authentication-password Broker authentication password. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-broker-authentication-password=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-broker-authentication-type Broker authentication type. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-broker-authentication-type=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-broker-authentication-user Broker authentication user. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-broker-authentication-user=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-broker-host Broker host. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-broker-host=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-broker-port Broker port. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-broker-port=<placeholder-text>
Input
int64
Default value
No default.
Valid values
The maximum value is 65535. The minimum value is 1.
--database-details-certificate Contents of a PEM or CRT file. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-certificate=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 20000 characters. The minimum length is 1 character. The value must match regular expression `/^[a-zA-Z0-9\\-=]+/`.
--database-details-certificate-extension Extension of the certificate file. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-certificate-extension=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-connection-method Connection method. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-connection-method=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-connection-mode Connection mode. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-connection-mode=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-connection-mode-value Connection mode value. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-connection-mode-value=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-connection-type Connection type. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-connection-type=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-controller-authentication-password Controller authentication password. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-controller-authentication-password=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-controller-authentication-type Controller authentication type. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-controller-authentication-type=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-controller-authentication-user Controller authentication user. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-controller-authentication-user=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-coordinator-host Coordinator host. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-coordinator-host=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-coordinator-port Coordinator port. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-coordinator-port=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum value is 65535. The minimum value is 1.
--database-details-cpd-hostname CPD hostname. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-cpd-hostname=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-credentials-key Base 64 encoded JSON file. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-credentials-key=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 10000 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-database-name Database hostname. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-database-name=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-hostname Hostname. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-hostname=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-hostname-in-certificate Hostname in certificate. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-hostname-in-certificate=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-hosts String of hostname:port. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-hosts=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 10000 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-informix-server Informix server value. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-informix-server=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 10000 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-password Password. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-password=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-port Port. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-port=<placeholder-text>
Input
int64
Default value
No default.
Valid values
The maximum value is 65535. The minimum value is 1.
--database-details-project-id Project ID. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-project-id=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-sasl Simple Authentication Security Layer (SASL) mode. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-sasl=true|false
Input
boolean
Default value
No default.
--database-details-sasl-mechanism Simple Authentication Security Layer (SASL) mechanism for Kafka. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-sasl-mechanism=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-service-api-key Service API key. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-service-api-key=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-service-hostname Service hostname. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-service-hostname=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-service-password Service password. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-service-password=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-service-port Service port. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-service-port=<placeholder-text>
Input
int64
Default value
No default.
Valid values
The maximum value is 65535. The minimum value is 1.
--database-details-service-ssl Service Secure Socket Layer (SSL). This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-service-ssl=true|false
Input
boolean
Default value
No default.
--database-details-service-token-url Service token URL. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-service-token-url=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-service-username Service username. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-service-username=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-ssl Secure Socket Layer (SSL) mode. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-ssl=true|false
Input
boolean
Default value
No default.
--database-details-tables Only for Kafka. Add Kafka tables. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-tables=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-username Username. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-username=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression `/^.*$/`.
--database-details-validate-server-certificate Verify certificate. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-validate-server-certificate=true|false
Input
boolean
Default value
No default.
--database-details-verify-host-name Verify host name. This option provides a value for a sub-field of the JSON option database-details. It is mutually exclusive with that option.
Status
Optional.
Syntax
--database-details-verify-host-name=true|false
Input
boolean
Default value
No default.
--database-id Database ID.
Status
Required.
Syntax
--database-id=<placeholder-text>
Input
string
Default value
No default.
--database-name Database name.
Status
Optional.
Syntax
--database-name=<placeholder-text>
Input
string
Default value
No default.
--database-properties Holds all the properties for a custom database.
Status
Optional.
Syntax
--database-properties=<placeholder-text>
Input
string
Default value
No default.
Valid values
The maximum length is 10000 items. The minimum length is 0 items. Provide a JSON string option or specify a JSON file to read from by providing a file path option that begins with a @. For example: --database-properties=@path/to/file.json.
--description Bucket description.
Status
Optional.
Syntax
--description=<description>
Input
string
Default value
No default.
--display-name Database display name.
Status
Required.
Syntax
--display-name=<display-name>
Input
string
Default value
No default.
--instance-id watsonx.data instance ID for IBM Software Hub or CRN for SaaS.
Status
Optional.
Syntax
--instance-id=<instance-id>
Input
string
Default value
No default.
--tags Specify the data asset tags. Multiple tags can be specified.
Status
Optional.
Syntax
--tags=<tag1,tag2,...>
Input
string
Default value
No default.
--type Engine type.
Status
Required.
Syntax
--type=<engine-type>
Input
string
Default value
No default.
Valid values
Supported types include presto, spark, prestissimo, netezza, db2, milvus, and other.

Examples

cpd-cli wx-data database
create \
--display-name new_database \
--type db2 \
--associated-catalog '{"catalog_name": "sampleCatalog", "catalog_tags": ["catalog_tag_1","catalog_tag_2"], "catalog_type": "iceberg"}' \
--database-details 1686792721 \
--database-details '{"authentication_type": "LDAP", 
"authentication_value": "LDAP", 
"broker_authentication_password": "samplepassword", 
"broker_authentication_type": "PASSWORD", 
"broker_authentication_user": "sampleuser", 
"broker_port": 4553, "broker_host": "samplehost", 
"certificate": "contents of a pem/crt file", 
"certificate_extension": "pem/crt", 
"connection_method": "basic, apikey", 
"connection_mode": "service_name", 
"connection_mode_value": "orclpdb", 
"connection_type": "JDBC, Arrow flight", 
"controller_authentication_password": "samplepassword", 
"controller_authentication_type": "PASSWORD", 
"controller_authentication_user": "sampleuser", 
"coordinator_host": "samplehost", 
"coordinator_port": 4553, 
"cpd_hostname": "samplecpdhostname", 
"credentials_key": "eyJ0eXBlIjoic2VydmljZV9hY2NvdW50IiwicHJvamVjdF9pZCI6ImNvbm9wcy1iaWdxdWVyeSIsInByaXZhdGVfa2V5X2lkIjoiMGY3......", 
"database_name": "new_database", 
"hostname": "db2@<hostname>.com", 
"hostname_in_certificate": "samplehostname", 
"hosts": "abc.com:1234,xyz.com:4321", 
"informix_server": "ol_informix1410", 
"password": "samplepassword", 
"port": 4553, 
"project_id": "conops-bigquery", 
"sasl": true, 
"sasl_mechanism": "plain", 
"service_api_key": "sampleapikey", 
"service_hostname": "api.sample.domain.com", 
"service_password": "samplepassword", 
"service_port": 443, 
"service_ssl": true, 
"service_token_url": "sampletoakenurl", 
"service_username": "sampleusername", 
"ssl": true, 
"tables": "kafka_table_name", 
"username": "sampleuser", 
"validate_server_certificate": true, 
"verify_host_name": true}' \
--database-properties '[{"encrypt": true, "key": "abc", "value": "xyz"}]' \
--description 'db2 extenal database description' \
--tags testdatabase,userdatabase \
--instance-id exampleString