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)

  1. Run the following command to extract the cpdctl tar file.
    tar -xzf cpdctl-mac.tar.gz
  2. Run the following command to verify Installation.
    ./cpdctl --help
    Note: On Mac, if the file is not executable, Go to Settings > Privacy & Security and allow execution permission.
  3. 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
  4. 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"
  5. Use the profile.
    ./cpdctl config profile use cpdctl_dev
  6. 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

  1. Run the following command to extract the cpdctl tar file.
    tar -xzf .\cpdctl-win.tar.gz
  2. Run the following command to verify Installation.
    .\cpdctl.exe --help
  3. 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"
  4. 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
  5. Use the profile.
    .\cpdctl.exe config profile use cpdctl_dev
  6. 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