connection discover-adhoc
Discover assets from the data source that is accessed through a connection description.
Syntax
cpd-cli connection discover-adhoc \
--datasource-type=<datasaource-type-id> \
--name=<connection-name> \
--path=<asset-file-path> \
--profile=<profile-name> \
[--asset-category=SYSTEM|USER] \
[--asset-properties=<json-object>] \
[--child-source-system=<child-source-systems-list>] \
[--context=<catalog-project-or-space-id>] \
[--cpd-config=<cpd-config-location>] \
[--description=<description>] \
[--detail=true|false] \
[--discovery-context=source|target] \
[--fetch=<asset-type1,asset-type2,...>] \
[--filters=<json-filter>] \
[--flags=<connection-flags>] \
[--gateway-id=<secure-gateway-id>] \
[--interaction-properties=<connection-interaction-properties>] \
[--jmes-query=<jmespath-query>] \
[--limit=<resource-limit>] \
[--new-location-definition<location-definition>] \
[--new-source-system=<custom-data-map>] \
[--offset=<resource-offset>] \
[--origin-country=<data-asset-country>] \
[--output=json|yaml|table] \
[--output-file=<output-file-location>] \
[--owner-id=<connection-owner-id>] \
[--properties=<connections-properties>] \
[--quiet] \
[--raw-output=true|false] \
[--ref-asset-id=<reference-catalog-connection-id>] \
[--ref-catalog-id=<catalog-connection-id>] \
[--rov=<rules-of-visibility>] \
[--tags=<tag1,tag2,...>] \
[--verbose]
Arguments
The connection discover-adhoc
command has no arguments.
Options
Table 1: Command options
| Option | Description |
|---|---|
--asset-category |
Specify the asset
category.
|
--asset-properties |
Specify a JSON object that
contains a set of properties to configure asset browsing
aspects.
|
--child-source-system |
Specify a list of child source
systems.
|
--context |
Specify whether assets
are discovered for reading (source) or writing (target). 'source' is the default when
no value is
specified.
|
--cpd-config |
The IBM Software Hub
configuration location. For example,
$HOME/.cpd-cli/config.
|
--datasource-type |
Specify the name or ID of the
data
source type to connect to. For example, "cfdcb449-1204-44ba-baa6-9a8a878e6aa7"
or
"db2".
|
--description |
Specify a connection
description.
|
--detail |
When the option is set to 'true',
additional asset-specific details are returned. When the option is set to 'false' specified, the
details are
not returned.
|
--discovery-context |
Specify whether assets are
discovered for reading (source) or writing (target). 'source' is the default when a
value is not
specified.
|
--fetch |
Specify whether to return the
asset's metadata, the asset's data, interaction properties, connection properties, or the
data
source type. 'metadata' is the default when the option is not specified. The option applies
only
when requesting details about a data set. Use a comma-separated string to specify multiple
fetch
values. For example,
--fetch=data,metadata,interaction,connection,datasource_type.
|
--filters |
Specify a custom filters *.json
file path. The default filters work for most cases.
|
--flags |
Identify flags that specify how a
connection is treated internally.
|
--gateway-id |
Specify a secure gateway ID to use
with the connection. A secure gateway is required when you connecting to an on-premises data
source.
The secure gateway ID is created with the Secure Gateway Service. Your on-premises secure
gateway
client must be connected to the gateway with this ID. For
example,
'E9oXGRIhv1e_prod_ng'.
|
|
|
Display command
help.
|
--jmes-query |
Provide a JMESPath query to
customize the output.
|
--interaction-properties |
Specify the interaction
properties that are allowed for a connection.
|
--limit |
Specify the total number of
resources.
|
--name |
|
--new-location-definition |
Specify the location that is used
by the connection.
|
--new-source-system |
Specify custom data that is
associated with an object.
|
--offset |
Specify the 0-based
index of the first result to return. For example, --offset=200. The default offset of 0 is used when
no value is specified.
|
--origin-country |
Specify the data asset ISO 3166
origin country code.
|
--output |
Specify an output
format.
|
--output-file |
Specify a file path where all
output is redirected.
|
--owner-id |
Specify the connection owner or
creator ID. The owner or creator ID is provided when a service ID token is used to create a
connection.
|
--path |
Specify the asset file
path.
|
--profile |
The name of the profile that you
created to store information about an instance of IBM Software Hub and your credentials for the
instance.
|
--properties |
Specify a JSON
object
that contains a set of properties to configure asset
browsing
aspects.
|
--quiet |
Suppress verbose
messages.
|
--raw-output |
When set to true, single values
are not surrounded by quotation marks in
JSON output
mode.
|
--ref-asset-id |
Specify the ID of the connection
in the reference catalog that the connection refers to for properties
values.
|
--ref-catalog-id |
Specify the catalog ID that the
connection refers to for properties values.
|
--rov |
Specify the rules of visibility
for connections.
|
--tags |
Specify the data asset tags.
Multiple tags can be specified.
|
--verbose |
Logs include more detailed
messages.
|
Examples
Note: The following examples use environment variables. Use a script to create
environment variables with the correct values for your environment. You can add the listed
environment variables to the installation variables script. For more information, see Setting up installation environment variables.
- Define the environment variables.
-
export DS_TYPE=<The data source name or identifier> export CONNECTION_NAME=<The connection name> export ASSET_PATH=<The asset file path> export CONNECTION_PROPERTIES=<The JSON object that contains a set of properties to configure asset browsing aspects> - Discover connections.
-
cpd-cli connection discover-adhoc \ --datasource-type=${DS_TYPE} \ --name=${CONNECTION_NAME} \ --path=${ASSET_PATH} \ --properties=${CONNECTION_PROPERTIES}