trigger_etl_job_execution

EtlJobsApi.trigger_etl_job_execution(id, role_id, trigger_etl_job_execution=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Trigger an ETL job run

Starts a Glue job run and writes an executions row. Omit the body or send {} to use job defaults. Read-only callers cannot run the job. Inactive or pending-registration jobs are rejected.

Parameters:
  • id (str) – UUID of the ETL job to run. (required)

  • role_id (str) – Amorphic role ID sent for authorization. Missing this header returns AUTH-1001. (required)

  • trigger_etl_job_execution (TriggerETLJobExecution)

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

JobExecutionInvokeResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: POST /jobs/{id}/executions

Request

The request body is optional.

Run with job defaults

{}

Override Spark workers for this run

{
  "WorkerType": "G.1X",
  "NumberOfWorkers": 2,
  "Timeout": 60,
  "JobBookmarkOption": "disable",
  "IsAutoScalingEnabled": false
}

Override Python shell DPU allocation

{
  "MaxCapacity": 1,
  "Timeout": 15,
  "JobBookmarkOption": "disable"
}

Success (HTTP 200)

Run started. Body includes ExecutionId (Glue JobRunId) and Message “Job Invocation Successful.”

Request / response example

{
  "ExecutionId": "jr_a1b2c3d4e5f6",
  "Message": "Job Invocation Successful."
}

Errors

Documented error codes: GE-1008.

HTTP 400

Job inactive/pending, read-only caller, invalid worker/capacity combination, or Glue start failure.

Job cannot be executed

{
  "Message": "Job is either inactive or pending registration so cannot be executed"
}

Read-only caller

{
  "Message": "Read only users for the job cannot perform this action."
}

Spark run missing worker pair

{
  "Message": "Both Worker Type & Number of Workers are required to run the job"
}

HTTP 500

Uncaught backend failure. Typical Message is “GE-1008 - Could not complete the request. Please try again.”

Request / response example

{
  "Message": "GE-1008 - Could not complete the request. Please try again."
}