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 = '{{ region }}' AND
Identifier = '{{ name }}';
Lists all jobs in a region.
SELECT
region,
name
FROM awscc.databrew.jobs_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.databrew.jobs
WHERE
Identifier = '{{ name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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