ibm-lh-client
commands and usage
The ibm-lh-client
package includes utilities for SSL certificate
management and engine management.
To use the utilities, the ibm-lh-client
package is to be installed on your
system. For more information, see Installing ibm-lh-client
package
ibm-lh-client
supports the following utilities:
cert-mgmt
Add or remove presto engine connection certificates to ibm-lh-client
truststore.
Syntax
./cert-mgmt --op=add --host=<host> --port=<port>
./cert-mgmt --op=remove --host=<host> --port=<port>
For more information on how to use cert-mgmt
, refer Setting up the ibm-lh command-line utility
presto-cli
Start an interactive session.
Syntax
bin/presto-cli --engine=<engine name> --catalog=tpch
For more information on how to use presto-cli
, refer Connecting to a Presto server
presto-run
Run SQL in a noninteractive manner.
Syntax
bin/presto-run --engine=<engine-name> --catalog=tpch <<< "select * from tiny.customer limit 10;"
bin/presto-run --engine=<engine-name> -f <path of sql file directory>
For more information on how to use presto-run
, refer Connecting to a Presto server
python-run
It provides a way to run python scripts.
Syntax
bin/python-run --engine=<engine-name>
os.environ['ENG_PASSWORD']
provides the saved password for the selected
engine.bin/python-run --engine=<lakehouse-engine-name> <python-script-in-sandbox>
For more information on how to use python-run
, refer Running Python scripts by using ibm-lh-client
dev-sandbox
Provides a containerized environment with useful utilities and python modules to help explore the Lakehouse.
Syntax
bin/dev-sandbox --engine=<engine-name>
For more information on how to use dev-sandbox
, refer Using the developer sandbox container
ibm-lh
It is a terminal-based interface that is designed to facilitate interaction with watsonx.data
resources. For more information on how to use ibm-lh
, refer ibm-lh commands and usage
connect-lh
Manage the connections for your watsonx.data engine. Use this command to add, remove, list, or show details of a presto engine connection.
Syntax
connect-lh --op=add \
--name=<alias> \
--host=<host> \
--port=<port> \
--username=<username> \
--password=<password>
connect-lh --op=remove --name=<alias>
connect-lh --op=details --name=<alias>
connect-lh --op=list
For more information
on how to use connect-lh
refer Setting up the ibm-lh command-line utility
- name
- The given name or alias to identify the connection.
- host
- IBM watsonx.data developer edition The hostname of the
Presto server.
IBM watsonx.data stand-alone The exposed secure route for presto server. For more information, see Exposing secure route to Presto server.
IBM watsonx.data on IBM Cloud Pak for Data The exposed secure route for presto server. For more information, see Exposing secure route to Presto server.
IBM watsonx.data on IBM Cloud To get the hostname of the Presto server, from the web console, go to Infrastructure Manager, select the engine you want to connect to and copy the host. The copied host contains both the host and port details. Use the host details as the host name of the Presto server.
- port
- The port number of the Presto server.
IBM watsonx.data developer edition The default port is
8443
.IBM watsonx.data stand-alone The default port is
443
.IBM watsonx.data on Cloud Pak for Data The default port is
443
.IBM watsonx.data on IBM Cloud To get the port number of the Presto server, from the web console, go to Infrastructure Manager, select the engine you want to connect to and copy the host. The copied host contains both the host and port details. Use the port details as the port number of the Presto server.
- username
- The username for authentication.
IBM watsonx.data developer edition The default
username
isibmlhadmin
.IBM watsonx.data stand-alone Username is the user created for stand-alone. The default
username
isadmin
. If IAM is enabled, the default user iscpadmin
.IBM watsonx.data on Cloud Pak for Data Username is the user created for Cloud Pak for Data. The default
username
isadmin
. If IAM is enabled, the default user iscpadmin
.IBM watsonx.data on IBM Cloud Username can either be
ibmlhapikey
oribmlhtoken
. For more information on how to useibmlhapikey
oribmlhtoken
, see Connect to Presto server.
- password
- The password for authentication.
IBM watsonx.data developer edition The default
password
ispassword
.IBM watsonx.data stand-alone To get the default password for defaultadmin
orcpadmin
user, run the following command:ibm-lakehouse-manage get-cpd-instance-details
IBM watsonx.data on Cloud Pak for Data, To get the default password for defaultadmin
orcpadmin
user, run the following command:cpd-cli manage get-cpd-instance-details \ --cpd_instance_ns=${PROJECT_CPD_INSTANCE} \ --get_admin_initial_credentials=true
Note: If the--password
option is not specified, password is prompted.IBM watsonx.data on IBM Cloud Password can either be
apikey
orapitoken
. For more information see, Get api key and Get api token.