wx-data ingestion create
Create an ingestion
job.
Syntax
cpd-cli wx-data ingestion create \
--engine-id=<engine-id> \
--target-table=<target-table> \
[--bucket-access-key=<placeholder-text>] \
[--bucket-details=<placeholder-text>] \
[--bucket-endpoint=<placeholder-text>] \
[--bucket-name=<placeholder-text>] \
[--bucket-region=<placeholder-text>] \
[--bucket-secret-key=<placeholder-text>] \
[--bucket-type=<placeholder-text>] \
[--csv-encoding=<placeholder-text>] \
[--csv-escape-character=<placeholder-text>] \
[--csv-field-delimiter=<placeholder-text>] \
[--csv-header=<placeholder-text>] \
[--csv-line-delimiter=<placeholder-text>] \
[--csv-property=<placeholder-text>] \
[--database-auth-value=<placeholder-text>] \
[--database-cert-extension=<placeholder-text>] \
[--database-certificate=<placeholder-text>] \
[--database-connection-mode=<placeholder-text>] \
[--database-connection-mode=<placeholder-text>] \
[--database-host=<placeholder-text>] \
[--database-id=<placeholder-text>] \
[--database-isssl=<placeholder-text>] \
[--database-name=<placeholder-text>] \
[--database-password=<placeholder-text>] \
[--database-port=<placeholder-text>] \
[--database-schema=<placeholder-text>] \
[--database-table=<placeholder-text>] \
[--database-type=<placeholder-text>] \
[--database-user-id=<placeholder-text>] \
[--database-warehouse=<placeholder-text>] \
[--driver-cores=<placeholder-text>] \
[--driver-memory=<placeholder-text>] \
[--execute-config=<placeholder-text>] \
[--executor-cores=<placeholder-text>] \
[--executor-memory=<placeholder-text>] \
[--iceberg-catalog=<placeholder-text>] \
[--iceberg-schema=<placeholder-text>] \
[--iceberg-snapshot-id=<placeholder-text>] \
[--iceberg-table=<placeholder-text>] \
[--iceberg-warehouse=<placeholder-text>] \
[--instance-id=<instance-id>] \
[--is-local-ingestion=true|false] \
[--job-id=<job-id>] \
[--num-executors=<placeholder-text>] \
[--partition-by=<placeholder-text>] \
[--schema=<placeholder-text>] \
[--source-data-files=<source-data-files>] \
[--source-database=<source-database>] \
[--source-file-type=<source-file-type>] \
[--source-iceberg-table=<source-iceberg-table>] \
[--sync-status=<sync-status>] \
[--target-write-mode=<target-write-mode>] \
[--transformation-schema=<transformation-schema>] \
[--user-name=<user-name>] \
[--validate-csv-header=true|false] \
[--validate-db-server-cert=true|false]
Options
Table 1: Command options
| Option | Description |
|---|---|
--bucket-access-key |
Bucket access
key.
|
--bucket-details |
Provide adhoc bucket details if
the bucket is not already registered.
|
--bucket-endpoint |
Bucket
endpoint.
|
--bucket-name |
Bucket
name.
|
--bucket-region |
Bucket
region.
|
--bucket-secret-key |
Bucket secret
key.
|
--bucket-type |
Bucket
type.
|
--csv-encoding |
Encoding used in CSV
file.
|
--csv-escape-character |
Escape character of CSV
file.
|
--csv-field-delimiter |
Field delimiter of CSV
file.
|
--csv-header |
Identify if header exists in CSV
file.
|
--csv-line-delimiter |
Line delimiter of CSV
file.
|
--csv-property |
Provide CSV file
properties.
|
--database-auth-value |
--database-auth-value
|
--database-cert-extension |
--database-cert-extension
|
--database-certificate |
Certificate content as
string.
|
--database-connection-mode |
Connection mode for
Oracle.
|
--database-connection-mode-value |
Connection mode value for
Oracle.
|
--database-host |
Database
hostname.
|
--database-id |
Database
ID.
|
--database-isssl |
Port is SSL
enabled.
|
--database-name |
Database
name.
|
--database-password |
Database
password.
|
--database-port |
Database
port.
|
--database-schema |
Database source schema
name.
|
--database-table |
Database source table
name.
|
--database-type |
Database
type.
|
--database-user-id |
Database
username.
|
--database-warehouse |
Warehouse name for
Snowflake.
|
--driver-cores |
Driver core(s) configuration for
Spark engine.
|
--driver-memory |
Driver memory configuration (in
GB) for Spark engine. .
|
--engine-id |
Spark Engine ID for Spark
ingestion or "lite-ingestion" for faster ingestion.
|
--execute-config |
Provide Spark engine
configurations.
|
--executor-cores |
Executor core(s) configuration for
Spark engine.
|
--executor-memory |
Executor core(s) configuration for
Spark engine.
|
--iceberg-catalog |
Source iceberg catalog
name.
|
--iceberg-schema |
Source iceberg schema
name.
|
--iceberg-snapshot-id |
Source iceberg snapshot
ID.
|
--iceberg-table |
Source iceberg table
name.
|
--iceberg-warehouse |
Source iceberg warehouse
name.
|
--instance-id |
watsonx.data instance ID for IBM
Software Hub or CRN for SaaS.
|
--is-local-ingestion |
If value is true, ingestion mode
is local. If value is false, ingestion mode is remote.
|
--job-id |
Ingestion job ID is used
to differentiate between jobs. If job ID is not provided, a unique random job ID will be generated
by default.
|
--num-executors |
Number of executors to assign for
Spark engine.
|
--partition-by |
Partition by expression of the
target table.
|
--schema |
Schema definitions for the source
data.
|
--source-data-files |
Comma separated source file(s) or
directory path.
|
--source-database |
Provide adhoc source database
details if the database is not already registered.
|
--source-file-type |
Source file
types.
|
--source-iceberg-table |
Provide source iceberg
details.
|
--sync-status |
Retrieve status synchronously as
the ingestion job is sent.
|
--target-table |
Target table
name.
|
--target-write-mode |
Determines if the spark job should
append to target or overwrite it.
|
--transformation-schema |
Transformation schema for altering
the table schema.
|
--user-name |
Specify a username that
corresponds to a project member.
|
--validate-csv-header |
Validate CSV header if the target
table exist.
|
--validate-db-server-cert |
Verify provided
certificate.
|
Examples
Remote ingestion:
cpd-cli wx-data ingestion create \
--engine-id spark637 \
--target-table sample_catalog.sample_schema.sample_tabl \
--csv-property '{"header": true, "encoding": "utf-8", "escape_character": "\\", "line_delimiter": "\n", "field_delimiter": ","}' \
--instance-id 1735472262311515 \
--source-data-files s3://sample-bucket/sample_file.csv
Lite ingestion:
cpd-cli wx-data ingestion create \
--engine-id lite-ingestion \
--bucket-name transient_bucket_name \
--instance-id 1735472262311515 \
--source-data-files /path_to_file/file.orc \
--target-table sample_catalog.sample_schema.sample_table
Database ingestion:
cpd-cli wx-data ingestion create \
--engine-id spark266 \
--target-table sample_catalog.sample_schema.sample_table \
--database-id sample_database_id \
--database-schema sample_database_name \
--database-table sample_database_table \
--instance-id 1735472262311515
Iceberg ingestion:
cpd-cli wx-data ingestion create \
--engine-id spark266 \
--target-table sample_catalog.sample_schema.sample_table \
--bucket-name iceberg-data
--iceberg-catalog sample_iceberg_catalog \
--iceberg-schema sample_iceberg_schema \
--iceberg-snapshot-id 7823318841638214979 \
--iceberg-table sample_iceberg_table \
--iceberg-warehouse sample_iceberg_warehouse \
--instance-id 1735472262311515