update_etl_job¶
- EtlJobsApi.update_etl_job(id, role_id, action=None, publish=None, reset_bookmark=None, content_type=None, etl_job_update_body=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Update ETL job, bookmarks, or trigger code generation
Updates an ETL job based on the input payload. Use action query parameter to perform actions, such as code generation or job bookmark management (enable, disable, pause, or reset the job bookmark).
- Parameters:
id (str) – UUID v4 of the ETL job. Invalid UUID format is rejected. (required)
role_id (str) – Amorphic role ID sent for authorization. Missing this header returns AUTH-1001. (required)
action (str) – generate-code starts AI code generation (body must include query). Bookmark values use underscores: enable_bookmark, disable_bookmark, pause_bookmark, reset_bookmark. Omit this parameter for a metadata update.
publish (str) – Set to true (case-insensitive) to publish the job instead of updating metadata. Other values return JOB-1023. Send an empty JSON object {} as the body.
reset_bookmark (str) – Legacy flag. Prefer action=reset_bookmark. Set to true to reset bookmarks; ignored when action is also provided.
content_type (str)
etl_job_update_body (ETLJobUpdateBody) – Required for metadata update and generate-code. For publish=true, send an empty JSON object {} (Content-Type application/json); omitting the body fails with “Invalid request body”. Body is ignored for bookmark and legacy reset_bookmark modes.
_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:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: PUT /jobs/{id}
Request¶
Required for metadata update and generate-code. For publish=true, send an empty JSON object {} (Content-Type application/json); omitting the body fails with “Invalid request body”. Body is ignored for bookmark and legacy reset_bookmark modes.
Partial metadata update
{
"Description": "Updated daily sales transform",
"Timeout": 60,
"MaxRetries": 1,
"WorkerType": "G.1X",
"NumberOfWorkers": 2,
"JobBookmarkOption": "disable",
"IsAutoScalingEnabled": false
}
Body when action=generate-code
{
"query": "Write a Glue Spark job that reads from the source dataset and writes parquet to S3"
}
Body when publish=true
{}
Success (HTTP 200)¶
Success Message depends on mode: job updated, published, bookmark managed, or code generation triggered (with ExecutionId/Status).
Metadata update
{
"Message": "Successfully updated job."
}
publish=true
{
"Message": "ETL job published successfully."
}
Bookmark reset
{
"Message": "Job bookmark reset completed successfully"
}
action=generate-code
{
"Message": "Code generation process has been triggered successfully",
"ExecutionId": "code-gen-jdoe-3fa85f64-5717-4562-b3fc-2c963f66afa6-1723708800",
"Status": "in_progress"
}
Errors¶
Documented error codes: GE-1001, JOB-1023, JOB-1022, GE-1008.
HTTP 400
Invalid body, unauthorized editor access, invalid query combination, bookmark not allowed, or code-generation query errors. Body is {“Message”: “<CODE> - <text>”} unless the Message is hard-coded.
Empty body on metadata update
{
"Message": "GE-1001 - Invalid input body"
}
publish query is not true
{
"Message": "JOB-1023 - Query string parameter publish should be True"
}
Reset bookmark while bookmarks are disabled
{
"Message": "JOB-1022 - Reset bookmark cannot be triggered if job bookmark option is disabled"
}
generate-code without query
{
"Message": "User query is required for code generation"
}
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."
}