View a markdown version of this page

使用 Step Functions 啟動 AWS Glue DataBrew 任務 - AWS Step Functions

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

使用 Step Functions 啟動 AWS Glue DataBrew 任務

了解如何使用 DataBrew 整合,透過 Step Functions 將資料清理和資料標準化步驟新增至分析和機器學習工作流程。

若要了解如何在 Step Functions 中整合 AWS 服務,請參閱 整合 服務和 在 Step Functions 中將參數傳遞至服務 API。

下列包含啟動 request-response 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

用於呼叫 DataBrew 的 IAM 政策

下列範例範本顯示 如何根據狀態機器定義中的資源 AWS 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/*" ] } ] }