jobs
Creates, updates, deletes or gets a job resource or lists jobs in a region
Overview
| Name | jobs |
| Type | Resource |
| Description | Resource schema for AWS::DataBrew::Job. |
| Id | awscc.databrew.jobs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
dataset_name | string | Dataset name |
encryption_key_arn | string | Encryption Key Arn |
encryption_mode | string | Encryption mode |
name | string | Job name |
type | string | Job type |
log_subscription | string | Log subscription |
max_capacity | integer | Max capacity |
max_retries | integer | Max retries |
outputs | array | |
data_catalog_outputs | array | |
database_outputs | array | |
output_location | object | Output location |
project_name | string | Project name |
recipe | object | Resource schema for AWS::DataBrew::Recipe. |
role_arn | string | Role arn |
tags | array | |
timeout | integer | Timeout |
job_sample | object | Job Sample |
profile_configuration | object | Profile Job configuration |
validation_configurations | array | Data quality rules configuration |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
name | string | Job name |
region | string | AWS region. |
For more information, see AWS::DataBrew::Job.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | jobs | INSERT | Name, RoleArn, Type, region |
delete_resource | jobs | DELETE | Identifier, region |
update_resource | jobs | UPDATE | Identifier, PatchDocument, region |
list_resources | jobs_list_only | SELECT | region |
get_resource | jobs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual job.
SELECT
region,
dataset_name,
encryption_key_arn,
encryption_mode,
name,
type,
log_subscription,
max_capacity,
max_retries,
outputs,
data_catalog_outputs,
database_outputs,
output_location,
project_name,
recipe,
role_arn,
tags,
timeout,
job_sample,
profile_configuration,
validation_configurations
FROM awscc.databrew.jobs
WHERE
region = 'us-east-1' AND
Identifier = '{{ name }}';
Lists all jobs in a region.
SELECT
region,
name
FROM awscc.databrew.jobs_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new job resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.databrew.jobs (
Name,
Type,
RoleArn,
region
)
SELECT
'{{ name }}',
'{{ type }}',
'{{ role_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.databrew.jobs (
DatasetName,
EncryptionKeyArn,
EncryptionMode,
Name,
Type,
LogSubscription,
MaxCapacity,
MaxRetries,
Outputs,
DataCatalogOutputs,
DatabaseOutputs,
OutputLocation,
ProjectName,
Recipe,
RoleArn,
Tags,
Timeout,
JobSample,
ProfileConfiguration,
ValidationConfigurations,
region
)
SELECT
'{{ dataset_name }}',
'{{ encryption_key_arn }}',
'{{ encryption_mode }}',
'{{ name }}',
'{{ type }}',
'{{ log_subscription }}',
'{{ max_capacity }}',
'{{ max_retries }}',
'{{ outputs }}',
'{{ data_catalog_outputs }}',
'{{ database_outputs }}',
'{{ output_location }}',
'{{ project_name }}',
'{{ recipe }}',
'{{ role_arn }}',
'{{ tags }}',
'{{ timeout }}',
'{{ job_sample }}',
'{{ profile_configuration }}',
'{{ validation_configurations }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: job
props:
- name: dataset_name
value: '{{ dataset_name }}'
- name: encryption_key_arn
value: '{{ encryption_key_arn }}'
- name: encryption_mode
value: '{{ encryption_mode }}'
- name: name
value: '{{ name }}'
- name: type
value: '{{ type }}'
- name: log_subscription
value: '{{ log_subscription }}'
- name: max_capacity
value: '{{ max_capacity }}'
- name: max_retries
value: '{{ max_retries }}'
- name: outputs
value:
- compression_format: '{{ compression_format }}'
format: '{{ format }}'
format_options:
csv:
delimiter: '{{ delimiter }}'
partition_columns:
- '{{ partition_columns[0] }}'
location:
bucket: '{{ bucket }}'
key: '{{ key }}'
overwrite: '{{ overwrite }}'
max_output_files: '{{ max_output_files }}'
- name: data_catalog_outputs
value:
- catalog_id: '{{ catalog_id }}'
database_name: '{{ database_name }}'
table_name: '{{ table_name }}'
s3_options:
location: null
database_options:
temp_directory: null
table_name: '{{ table_name }}'
overwrite: '{{ overwrite }}'
- name: database_outputs
value:
- glue_connection_name: '{{ glue_connection_name }}'
database_output_mode: '{{ database_output_mode }}'
database_options: null
- name: output_location
value:
bucket: '{{ bucket }}'
key: '{{ key }}'
bucket_owner: '{{ bucket_owner }}'
- name: project_name
value: '{{ project_name }}'
- name: recipe
value:
description: '{{ description }}'
name: '{{ name }}'
steps:
- action:
operation: '{{ operation }}'
parameters: null
condition_expressions:
- condition: '{{ condition }}'
value: '{{ value }}'
target_column: '{{ target_column }}'
tags:
- key: '{{ key }}'
value: '{{ value }}'
- name: role_arn
value: '{{ role_arn }}'
- name: tags
value:
- null
- name: timeout
value: '{{ timeout }}'
- name: job_sample
value:
mode: '{{ mode }}'
size: '{{ size }}'
- name: profile_configuration
value:
dataset_statistics_configuration:
included_statistics:
- '{{ included_statistics[0] }}'
overrides:
- statistic: null
parameters: {}
profile_columns:
- regex: '{{ regex }}'
name: '{{ name }}'
column_statistics_configurations:
- selectors:
- null
statistics: null
entity_detector_configuration:
entity_types:
- '{{ entity_types[0] }}'
allowed_statistics:
statistics:
- null
- name: validation_configurations
value:
- ruleset_arn: '{{ ruleset_arn }}'
validation_mode: '{{ validation_mode }}'
UPDATE example
Use the following StackQL query and manifest file to update a job resource, using stack-deploy.
/*+ update */
UPDATE awscc.databrew.jobs
SET PatchDocument = string('{{ {
"DatasetName": dataset_name,
"EncryptionKeyArn": encryption_key_arn,
"EncryptionMode": encryption_mode,
"LogSubscription": log_subscription,
"MaxCapacity": max_capacity,
"MaxRetries": max_retries,
"Outputs": outputs,
"DataCatalogOutputs": data_catalog_outputs,
"DatabaseOutputs": database_outputs,
"OutputLocation": output_location,
"ProjectName": project_name,
"Recipe": recipe,
"RoleArn": role_arn,
"Tags": tags,
"Timeout": timeout,
"JobSample": job_sample,
"ProfileConfiguration": profile_configuration,
"ValidationConfigurations": validation_configurations
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.databrew.jobs
WHERE
Identifier = '{{ name }}' AND
region = 'us-east-1';
Permissions
To operate on the jobs resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
databrew:CreateProfileJob,
databrew:CreateRecipeJob,
databrew:DescribeJob,
databrew:TagResource,
databrew:UntagResource,
iam:PassRole
databrew:DescribeJob,
iam:ListRoles
databrew:UpdateProfileJob,
databrew:UpdateRecipeJob,
databrew:TagResource,
databrew:UntagResource,
iam:PassRole
databrew:DeleteJob
databrew:ListJobs,
databrew:ListTagsForResource,
iam:ListRoles