Jerome Rajan

0 %
Jerome Rajan
Data & AI Architect at Google
  • Residence:
    India
  • City:
    Mumbai
GCP Agent Platform
GenAI
SQL
Dataproc, EMR
Hadoop
BigQuery
PySpark, Python
Data Pipeline Design
Tableau, Redshift, Snowflake
IBM DataStage
  • AWS Lambda, S3, EMR, SQS, DynamoDB, Step Functions, Cloud Functions
  • Unix Shell Scripting, Python
  • Oracle, DB2, Redis
  • Alteryx, VBA, Blueprism, UiPath
English
Tamil
Hindi
Malayalam
Marathi
Spanish

IBM DataStage orchadmin Command Reference Guide

February 25, 2018

In IBM InfoSphere DataStage, Parallel Datasets (.ds) store a lightweight descriptor file at the target path while distributing raw partition segments across the scratch/resource nodes defined in your APT_CONFIG_FILE. Never delete a .ds file with standard Unix rm—doing so removes only the descriptor and orphans gigabytes of partition data across compute nodes! Always use the orchadmin CLI utility.

Quick Answer: How to Delete a Dataset in DataStage (orchadmin rm)

To safely delete an IBM DataStage parallel dataset (.ds) along with all of its partition segment files across compute nodes, run orchadmin rm after sourcing dsenv and setting APT_CONFIG_FILE:

# Safely delete a DataStage dataset (descriptor + all partition segments)
orchadmin rm /path/to/dataset.ds

# Force-delete using current APT_CONFIG_FILE if a node is unreachable
orchadmin rm -f -x /path/to/dataset.ds

1. Required Environment Initialization

export DSHOME=$(cat /.dshome)
. "$DSHOME/dsenv"

export LD_LIBRARY_PATH="$APT_ORCHHOME/lib:$LD_LIBRARY_PATH"
export APT_CONFIG_FILE="$DSHOME/../Configurations/default.apt"
export PATH="$DSHOME/bin:$APT_ORCHHOME/bin:$PATH"

2. Synopsis & Global Options

orchadmin <command> [ -options... ] descriptor-files...
orchadmin <command> -help      # Print help for a specific command
orchadmin -help                # Print help for all commands
orchadmin -f command-file      # Execute commands from a file
orchadmin -                    # Read commands from stdin
  • -input_charset <map> / -output_charset <map> / -os_charset <map>: Configure NLS character set mappings.
  • -escaped: Present command-line characters in two-byte Unicode hex format.

3. copy (cp) — Duplicate a Parallel Dataset

Copies the schema, data segments, and preserve-partitioning flag from source to target (truncating target if it exists):

orchadmin copy source_dataset.ds target_dataset.ds

4. delete (del / rm) — Safely Remove Descriptor & All Node Segments

  • -f: Force deletion even if some partition nodes are unreachable.
  • -x: Use the current APT_CONFIG_FILE rather than the config stored inside the dataset.
# Delete all parallel datasets in the current directory
orchadmin rm *.ds

5. truncate — Empty Data While Keeping Descriptor & Schema

  • -n <segments>: Leave the specified number of segments (default 0).
  • -f / -x: Force or override stored APT config.
# Keep first 10 segments of big.ds
orchadmin truncate -n 10 big.ds

# Remove all records from small.ds
orchadmin truncate small.ds

6. dump — Inspect Dataset Records on stdout

  • -field <name>: Dump only specified top-level column(s) (repeatable).
  • -name: Prefix each value with field_name:.
  • -n <numrec>: Limit records output per partition.
  • -part <N>: Dump only partition N.
  • -p <period> / -skip <N>: Sample every Nth record or skip leading records.
# Dump all records in small.ds prefixed with column names
orchadmin dump -name small.ds

# Dump first 99 values of "customer" from partition 0 of big.ds
orchadmin dump -part 0 -n 99 -field customer big.ds

7. describe (lp / lf / ls / ll) — Inspect Schema, Partitions & Data Files

  • -s (alias ls): Print record schema.
  • -p (alias lp): List partitioning metadata.
  • -f (alias lf): List physical segment files across nodes.
  • -c: Print the stored APT_CONFIG_FILE.
  • -l (alias ll): Full report (-p -f -s -e -v -c).
orchadmin ll file1.ds file2.ds

8. diskinfo & check — Validate Disk Pools & APT Config

# Report disk pool usage across node pool "bignodes"
orchadmin diskinfo -np bignodes pool1

# Validate APT_CONFIG_FILE connectivity and paths
orchadmin check
Posted in TechnologyTags:
1 Comment
  • sudheer M

    We have 7 projects and each project having 1000 Parallel jobs, and development team work on azail model, how to list all the jobs in each project which is modified in this week, to generate report on weekly basis. could you please help with steps or process?

    8:59 am August 7, 2023 Reply
Write a comment
Be Original
Would the boy you were be proud of the man you are?