ALTER JOB

This article explains how to alter your ingestion and transformation jobs.

The ALTER JOB command enables you to update the mutable properties of your jobs and add or drop expectations.

Syntax

ALTER JOB <job_identifier> 
    SET <job_option> = <value>;

Note that not all job options are mutable.

Job options such as END_AT, RUN_PARALLELISM, AGGREGATION_PARALLELISM, CONTENT_TYPE, COMPUTE_CLUSTER, and COMMENT are always editable for all jobs.

On the other hand, options such as START_FROM, COMPRESSION, RUN_INTERVAL, and ALLOW_CARTESIAN_PRODUCTS are not editable for any jobs.

Furthermore, there are certain job options that are only available for specific job types; check the documentation linked below for your job type (ingestion or transformation) to see the comprehensive list of mutable options.

For example, to alter an Amazon S3 ingestion job, click on the Amazon S3 link beneath Ingestion jobs to view the list of available source and job options.

All mutable options are denoted by — editable in the individual option descriptions.

Ingestion jobs

Transformation jobs

Examples

Alter one job option

ALTER JOB transform_orders_and_insert_into_athena
    SET COMPUTE_CLUSTER = high_memory_cluster;

Alter multiple job options

You can alter multiple job options in the same statement, using the SET keyword for each option you need to change:

ALTER JOB transform_orders_and_insert_into_athena
    SET COMPUTE_CLUSTER = high_memory_cluster
    SET END_AT = NOW;

Add an expectation

You can easily add an expectation to an existing job using the ALTER JOB command. The syntax below shows how to alter a job you have already created:

ALTER JOB <job_name> 
ADD EXPECTATION <expectation_name> 
EXPECT <sql_predicate> ON VIOLATION { DROP | WARN }

Drop an expectation

To drop an expectation, use the ALTER JOB command using the following syntax:

ALTER JOB <job_name> 
DROP EXPECTATION <expectation_name>

When you drop an expectation, the entry is dropped from the system.monitoring.expectations system table, so if you want to retain a count of warnings or dropped rows, ensure you take a copy of these values prior to dropping the expectation. Furthermore, values are removed from the system.monitoring.jobs table.

Last updated