Skip to main content

jobs

Creates, updates, deletes, gets or lists a jobs resource.

Overview

Namejobs
TypeResource
Idaws.databrew.jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
create_datestring (date-time)The date and time that the job was created.
created_bystringThe identifier (user name) of the user associated with the creation of the job.
data_catalog_outputsarrayOne or more artifacts that represent the Glue Data Catalog output from running the job.
database_outputsarrayRepresents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.
dataset_namestringThe dataset that the job acts upon.
encryption_key_arnstringThe Amazon Resource Name (ARN) of an encryption key that is used to protect the job.
encryption_modestringThe encryption mode for the job, which can be one of the following: SSE-KMS - Server-side encryption with keys managed by KMS. SSE-S3 - Server-side encryption with keys managed by Amazon S3. (SSE-KMS, SSE-S3)
job_sampleobjectA sample configuration for profile jobs only, which determines the number of rows on which the profile job is run. If a JobSample value isn't provided, the default is used. The default value is CUSTOM_ROWS for the mode parameter and 20,000 for the size parameter.
last_modified_bystringThe identifier (user name) of the user who last modified the job.
last_modified_datestring (date-time)The date and time that the job was last modified.
log_subscriptionstringIndicates whether Amazon CloudWatch logging is enabled for this job. (ENABLE, DISABLE)
max_capacityintegerThe maximum number of compute nodes that DataBrew can consume when the job processes data.
max_retriesintegerThe maximum number of times to retry the job after a job run fails.
namestringThe name of the job.
outputsarrayOne or more artifacts that represent the output from running the job.
profile_configurationobjectConfiguration for profile jobs. Configuration can be used to select columns, do evaluations, and override default parameters of evaluations. When configuration is undefined, the profile job will apply default settings to all supported columns.
project_namestringThe DataBrew project associated with this job.
recipe_referenceobjectRepresents the name and version of a DataBrew recipe.
resource_arnstringThe Amazon Resource Name (ARN) of the job.
role_arnstringThe ARN of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.
tagsobjectMetadata tags associated with this job.
timeoutintegerThe job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of TIMEOUT.
typestringThe job type, which must be one of the following: PROFILE - The job analyzes the dataset to determine its size, data types, data distribution, and more. RECIPE - The job applies one or more transformations to a dataset. (PROFILE, RECIPE)
validation_configurationsarrayList of validation configurations that are applied to the profile job.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_jobselectname, regionReturns the definition of a specific DataBrew job.
list_jobsselectregiondatasetName, maxResults, nextToken, projectNameLists all of the DataBrew jobs that are defined.
create_profile_jobinsertregion, DatasetName, OutputLocation, RoleArnCreates a new job to analyze a dataset and create its data profile.
create_recipe_jobinsertregion, RoleArnCreates a new job to transform input data, using steps defined in an existing Glue DataBrew recipe
update_profile_jobupdatename, region, OutputLocation, RoleArnModifies the definition of an existing profile job.
update_recipe_jobupdatename, region, RoleArnModifies the definition of an existing DataBrew recipe job.
delete_jobdeletename, regionDeletes the specified DataBrew job.
start_job_runexecname, regionRuns a DataBrew job.
stop_job_runexecname, run_id, regionStops a particular run of a job.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
namestringThe name of the job to be stopped.
regionstringAWS region (default: us-east-1)
run_idstringThe ID of the job run to be stopped.
datasetNamestringThe name of a dataset. Using this parameter indicates to return only those jobs that act on the specified dataset.
maxResultsintegerThe maximum number of results to return in this request.
nextTokenstringA token generated by DataBrew that specifies where to continue pagination if a previous request was truncated. To get the next set of pages, pass in the NextToken value from the response object of the previous page call.
projectNamestringThe name of a project. Using this parameter indicates to return only those jobs that are associated with the specified project.

SELECT examples

Returns the definition of a specific DataBrew job.

SELECT
create_date,
created_by,
data_catalog_outputs,
database_outputs,
dataset_name,
encryption_key_arn,
encryption_mode,
job_sample,
last_modified_by,
last_modified_date,
log_subscription,
max_capacity,
max_retries,
name,
outputs,
profile_configuration,
project_name,
recipe_reference,
resource_arn,
role_arn,
tags,
timeout,
type,
validation_configurations
FROM aws.databrew.jobs
WHERE name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new job to analyze a dataset and create its data profile.

INSERT INTO aws.databrew.jobs (
DatasetName,
EncryptionKeyArn,
EncryptionMode,
Name,
LogSubscription,
MaxCapacity,
MaxRetries,
OutputLocation,
Configuration,
ValidationConfigurations,
RoleArn,
Tags,
Timeout,
JobSample,
region
)
SELECT
'{{ DatasetName }}' /* required */,
'{{ EncryptionKeyArn }}',
'{{ EncryptionMode }}',
'{{ Name }}',
'{{ LogSubscription }}',
{{ MaxCapacity }},
{{ MaxRetries }},
'{{ OutputLocation }}' /* required */,
'{{ Configuration }}',
'{{ ValidationConfigurations }}',
'{{ RoleArn }}' /* required */,
'{{ Tags }}',
{{ Timeout }},
'{{ JobSample }}',
'{{ region }}'
RETURNING
name
;

UPDATE examples

Modifies the definition of an existing profile job.

UPDATE aws.databrew.jobs
SET
Configuration = '{{ Configuration }}',
EncryptionKeyArn = '{{ EncryptionKeyArn }}',
EncryptionMode = '{{ EncryptionMode }}',
LogSubscription = '{{ LogSubscription }}',
MaxCapacity = {{ MaxCapacity }},
MaxRetries = {{ MaxRetries }},
OutputLocation = '{{ OutputLocation }}',
ValidationConfigurations = '{{ ValidationConfigurations }}',
RoleArn = '{{ RoleArn }}',
Timeout = {{ Timeout }},
JobSample = '{{ JobSample }}'
WHERE
name = '{{ name }}' --required
AND region = '{{ region }}' --required
AND OutputLocation = '{{ OutputLocation }}' --required
AND RoleArn = '{{ RoleArn }}' --required
RETURNING
name;

DELETE examples

Deletes the specified DataBrew job.

DELETE FROM aws.databrew.jobs
WHERE name = '{{ name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Runs a DataBrew job.

EXEC aws.databrew.jobs.start_job_run
@name='{{ name }}' --required,
@region='{{ region }}' --required
;