amazon-web-services - CloudFormation 模板中的 Aws Glue Crawler 重新抓取策略
问题描述
我想在通过 CloudFormation Stack 创建 Glue Crawler 时设置Recrawl Policy 。
无法找到通过 CloudFormation 设置重新抓取策略的方法。
请帮助在此模板中添加此配置,否则如果无法完成,请告诉我。
Parameters:
CFNCrawlerName:
Type: String
Default: cfn-crawler-flights-1
CFNDatabaseName:
Type: String
Default: cfn-database-flights-1
CFNTablePrefixName:
Type: String
Default: cfn_sample_1_
Resources:
CFNRoleFlights:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Principal:
Service:
- "glue.amazonaws.com"
Action:
- "sts:AssumeRole"
Path: "/"
Policies:
- PolicyName: "root"
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Action: "*"
Resource: "*"
CFNDatabaseFlights:
Type: AWS::Glue::Database
Properties:
CatalogId: !Ref AWS::AccountId
DatabaseInput:
Name: !Ref CFNDatabaseName
Description: "AWS Glue container to hold metadata tables for the flights crawler"
CFNCrawlerFlights:
Type: AWS::Glue::Crawler
Properties:
Name: !Ref CFNCrawlerName
Role: !GetAtt CFNRoleFlights.Arn
Description: AWS Glue crawler to crawl flights data
DatabaseName: !Ref CFNDatabaseName
Targets:
S3Targets:
- Path: "s3://crawler-public-us-east-1/flight/2016/csv"
TablePrefix: !Ref CFNTablePrefixName
SchemaChangePolicy:
UpdateBehavior: "UPDATE_IN_DATABASE"
DeleteBehavior: "LOG"
Configuration: "{\"Version\":1.0,\"CrawlerOutput\":{\"Partitions\":{\"AddOrUpdateBehavior\":\"InheritFromTable\"},\"Tables\":{\"AddOrUpdateBehavior\":\"MergeNewColumns\"}}}"
我在这里找到了这个云形成模板
解决方案
推荐阅读
- java - 基数排序方法有效,但不确定它是否正确
- hyperledger-fabric - 无法在超级账本结构上启动第一个网络
- c++ - 如何编写允许类似 std::vector 初始化的类接口
- pandas - 如何使用 pandas 移动 Dataframe 中的特定行?
- javascript - 如何替换 var 让“关闭回调”
- azure - 使用 Azure SDK 为 Azure Web 应用上传 SSL 证书文件 (.fpx)
- kotlin - 如何使用 Kotlin 协程调用阻塞函数?
- .net - 实体框架 - 一对多关系返回不正确的记录数
- python - 如何将张量场数据与 Mayavi 一起用于 HyperStreamLine 或 TensorGlyp 可视化?
- javascript - 怎么把`db.db.collection`返回的内容放到`res.json()`里面?