Last updated: Dec 09, 2024
CPDCTL and the dsjob
tool are command-line interfaces (CLI) you can
use to manage your DataStage® resources in IBM Cloud Pak® for Data.
Use the command-line tools to reuse any DataStage scripts that exist on your system.
You can use the following command-line tools to run DataStage tasks:
- CPDCTL:
cpdctl dsjob
orcpdctl datastage
- cpd-cli:
cpd-cli datastage
The documentation for the cpdctl dsjob
command-line
tool, including the full list of commands, can be found at the dsjob README.
Resources
For more information on the CPDCTL commands, see IBM Cloud Pak for Data Command Line Interface.
To create a profile and enable dsjob
use the following scripts.
For Cloud Pak for Data as a Service:
#!/bin/bash
export DSJOB_URL=https://dataplatform.cloud.ibm.com
export CPDCTL_ENABLE_DSJOB=true
DSJOB_APIKEY=<YOUR APIKEY>
cpdctl config profile set ibmcloud-profile --url $DSJOB_URL --apikey $DSJOB_APIKEY --watson-studio-url https://api.dataplatform.cloud.ibm.com
If you have multiple profiles, you can run a command against a specific profile with
either
cpdctl project list --profile <PROFILE>
or
CPD_PROFILE=<PROFILE> cpdctl project list
. For example, to
run multiple commands in a profile without changing your default profile, you can
run the following commands.
export CPD_PROFILE=<PROFILE-1>
cpdctl project list
cpdctl ....
export CPD_PROFILE=<PROFILE-2>
cpdctl project list
cpdctl ....
unset CPD_PROFILE <go back to default profile>