使用 Step Functions 启动 Amazon Glue DataBrew 任务 - Amazon Step Functions
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

使用 Step Functions 启动 Amazon Glue DataBrew 任务

了解如何使用 DataBrew 集成,通过 Step Functions 将数据清理和数据规范化步骤添加到分析和机器学习工作流程中。

要了解如何在 Step Functions 中与 Amazon 服务集成,请参阅集成 服务在 Step Functions 中将参数传递给服务 API

以下内容包含一个启动请求-响应 DataBrew 作业的 Task 状态。

"DataBrew StartJobRun": { "Type": "Task", "Resource": "arn:aws:states:::databrew:startJobRun", "Arguments": { "Name": "sample-proj-job-1" }, "Next": "NEXT_STATE" },

下面包含一个启动同步 DataBrew 作业的 Task 状态。

"DataBrew StartJobRun": { "Type": "Task", "Resource": "arn:aws:states:::databrew:startJobRun.sync", "Arguments": { "Name": "sample-proj-job-1" }, "Next": "NEXT_STATE" },
Step Functions 中的参数以 PascalCase 表示

即使原生服务 API 采用 camelCase(例如 API 操作 startSyncExecution),也可以采用 PascalCase 指定参数,例如:StateMachineArn

支持的 DataBrew API

用于调用 DataBrew 的 IAM 策略

以下示例模板展示了 Amazon Step Functions 如何根据状态机定义中的资源生成 IAM 策略。有关更多信息,请参阅Step Functions 如何为集成服务生成 IAM 策略探索 Step Functions 中的服务集成模式

Run a Job (.sync)
{ "Version":"2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "databrew:startJobRun", "databrew:listJobRuns", "databrew:stopJobRun" ], "Resource": [ "arn:aws:databrew:us-east-1:123456789012:job/*" ] } ] }
Request Response
{ "Version":"2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "databrew:startJobRun" ], "Resource": [ "arn:aws:databrew:us-east-1:123456789012:job/*" ] } ] }