

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用 Step Functions 开始 AWS Glue DataBrew 作业
<a name="connect-databrew"></a>

了解如何使用 Step F DataBrew unctions 将数据清理和数据标准化步骤添加到分析和机器学习工作流程中。

要了解如何在 Step Functions 中与 AWS 服务集成，请参阅[集成 服务](integrate-services.md)和[在 Step Functions 中将参数传递给服务 API](connect-parameters.md)。

以下内容包括启动请求-响应 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 APIs
<a name="connect-databrew-api"></a>
+ `[https://docs.aws.amazon.com/databrew/latest/dg/API_StartJobRun.html](https://docs.aws.amazon.com/databrew/latest/dg/API_StartJobRun.html)`

## 用于呼叫的 IAM 政策 DataBrew
<a name="databrew-iam"></a>

以下示例模板展示了如何根据状态机定义中的资源 AWS Step Functions 生成 IAM 策略。有关更多信息，请参阅[Step Functions 如何为集成服务生成 IAM 策略](service-integration-iam-templates.md)和[探索 Step Functions 中的服务集成模式](connect-to-resource.md)。

------
#### [ 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/*"
            ]
        }
    ]
}
```

------