Using cpdctl CLI for watsonx.data Dev Edition
The cpdctl command-line interface (CLI) allows you to interact with watsonx.data developer edition
efficiently.
This topic provides instructions for downloading, setting up, and using cpdctl
on MacOS, Linux(RHEL), and Windows 10/11 systems.
Download the CLI
Download the cpdctl compressed file from : Installation file.
Instruction for Mac and Linux(RHEL)
- Run the following command to extract the
cpdctltar file.tar -xzf cpdctl-mac.tar.gz - Run the following command to verify Installation.
./cpdctl --helpNote: On Mac, if the file is not executable, Go to Settings > Privacy & Security and allow execution permission. - Run the following command to create an encryption key (first-time setup only).
openssl rand -hex 32 > key.txt export CPDCTL_ENCRYPTION_KEY_PATH=key.txt - Configure
profile.
./cpdctl config profile set cpdctl_dev --username ibmlhadmin --password password --url "https://localhost:6443" --env "WATSONX_DATA_INSTANCE_ID=0000-0000-0000-0000" - Use the profile.
./cpdctl config profile use cpdctl_dev - Enable developer edition detector.
export CPDCTL_ENABLE_DEV_EDITION_AUTODETECT=true- Example commands for usage:
- Listing storage
-
./cpdctl wx-data bucket list
- Creating an ingestion job
-
./cpdctl wx-data ingestion create \ --source-data-files s3://bucketcos/shibil.csv \ --engine-id spark804 \ --driver-cores 0 \ --driver-memory "0G" \ --executor-cores 2 \ --executor-memory "4G" \ --num-executors 1 \ --target-table iceberg_data.cpdctl_test_schema.table5 --sync-status
Instruction for Windows10/11
- Run the following command to extract the
cpdctltar file.tar -xzf .\cpdctl-win.tar.gz - Run the following command to verify Installation.
.\cpdctl.exe --help - Run the following command to create an encryption key (first-time setup
only).
openssl rand -hex 32 | Out-File -Encoding ASCII key.txt $env:CPDCTL_ENCRYPTION_KEY_PATH = "key.txt" - Configure
profile.
.\cpdctl.exe config profile set cpdctl_dev --username ibmlhadmin --password password --url "https://localhost:6443" --env "WATSONX_DATA_INSTANCE_ID=0000-0000-0000-0000 - Use the profile.
.\cpdctl.exe config profile use cpdctl_dev - Enable developer edition detector.
$env:CPDCTL_ENABLE_DEV_EDITION_AUTODETECT = "true"- Example commands for usage:
- Listing storage
-
.\cpdctl.exe wx-data bucket list
- Creating ingestion job
-
.\cpdctl.exe wx-data ingestion create ` --source-data-files s3://bucketcos/shibil.csv ` --engine-id spark804 ` --driver-cores 0 ` --driver-memory "0G" ` --executor-cores 2 ` --executor-memory "4G" ` --num-executors 1 ` --target-table iceberg_data.cpdctl_test_schema.table1 --sync-status