Submit a Dataproc Job
Submit a job to a Dataproc cluster.CLI Command
Options
Recommended SetupFor security and convenience, set your GCP credentials as environment variables:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Submit Spark, PySpark, Hive, and Presto jobs to Google Cloud Dataproc clusters and list clusters from Paradime Bolt using the paradime run gcp-dataproc CLI.
--main-file or --job-file are accessible to the cluster.paradime run gcp-dataproc-trigger
| Flag | Type | Description |
|---|---|---|
--service-account-key-file | Required, TEXT | Path to your GCP service account JSON key file. Can be set via GCP_SERVICE_ACCOUNT_KEY_FILE environment variable. |
--project | Required, TEXT | Your GCP project ID. Can be set via GCP_PROJECT_ID environment variable. |
--location | Required, TEXT | GCP region (e.g. ‘us-central1’). Can be set via GCP_LOCATION environment variable. |
--cluster-name | Required, TEXT | The name of the Dataproc cluster to submit the job to. |
--job-type | Required, CHOICE | Type of Dataproc job to submit. Choices: pyspark, spark, hive, spark-sql, pig, presto. |
--main-file | Optional, TEXT | GCS path to the main file (required for pyspark/spark jobs). |
--main-class | Optional, TEXT | Main class name (for spark jobs with JAR). |
--args | Optional, TEXT (multiple) | Arguments to pass to the job. |
--job-file | Optional, TEXT | GCS path to the query file (required for hive/spark-sql/pig/presto jobs). |
--wait / --no-wait | Optional, Flag | Wait for the Dataproc job to complete before returning. Default: --wait. Can be set via GCP_DATAPROC_TRIGGER_WAIT environment variable. |
--timeout | Optional, INTEGER | Maximum time to wait for completion (in minutes). Only used with --wait. Default: 1440 (24 hours). Can be set via GCP_DATAPROC_TRIGGER_TIMEOUT environment variable. |
--help | Optional, Flag | Show the help message and exit. |
GCP_SERVICE_ACCOUNT_KEY_FILE="/path/to/service-account-key.json"
GCP_PROJECT_ID="your-gcp-project-id"
GCP_LOCATION="us-central1"
# Submit a PySpark job (using environment variables)
paradime run gcp-dataproc-trigger \
--cluster-name "my-cluster" \
--job-type pyspark \
--main-file "gs://my-bucket/jobs/main.py" \
--args "--date=2024-01-15"
paradime run gcp-dataproc-list-clusters
| Flag | Type | Description |
|---|---|---|
--service-account-key-file | Required, TEXT | Path to your GCP service account JSON key file. Can be set via GCP_SERVICE_ACCOUNT_KEY_FILE environment variable. |
--project | Required, TEXT | Your GCP project ID. Can be set via GCP_PROJECT_ID environment variable. |
--location | Required, TEXT | GCP region (e.g. ‘us-central1’). Can be set via GCP_LOCATION environment variable. |
--help | Optional, Flag | Show the help message and exit. |
# List all clusters (using environment variables)
paradime run gcp-dataproc-list-clusters
# With explicit credentials
paradime run gcp-dataproc-list-clusters \
--service-account-key-file "/path/to/service-account-key.json" \
--project "your-gcp-project-id" \
--location "us-central1"
| Environment Variable | Description |
|---|---|
GCP_SERVICE_ACCOUNT_KEY_FILE | Path to your GCP service account JSON key file |
GCP_PROJECT_ID | Your GCP project ID |
GCP_LOCATION | GCP region (e.g. ‘us-central1’) |
GCP_DATAPROC_TRIGGER_WAIT | Whether to wait for job completion |
GCP_DATAPROC_TRIGGER_TIMEOUT | Maximum time to wait for completion (minutes) |