【发布时间】:2020-03-09 14:20:21
【问题描述】:
我正在尝试更改 AWS Crawler 使用 boto3 创建的表名。代码如下:
import boto3
database_name = "eventbus"
table_name = "enrollment_user_enroll_cancel_1_0_0"
new_table_name = "enrollment_user_enroll_cancel"
client = boto3.client("glue", region_name='us-west-1')
response = client.get_table(DatabaseName=database_name, Name=table_name)
table_input = response["Table"]
table_input["Name"] = new_table_name
print(table_input)
print(table_input["Name"])
table_input.pop("CreatedBy")
table_input.pop("CreateTime")
table_input.pop("UpdateTime")
client.create_table(DatabaseName=database_name, TableInput=table_input)
得到以下错误:
botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in TableInput: "DatabaseName", must be one of: Name, Description, Owner, LastAccessTime, LastAnalyzedTime, Retention, StorageDescriptor, PartitionKeys, ViewOriginalText, ViewExpandedText, TableType, Parameters
Unknown parameter in TableInput: "IsRegisteredWithLakeFormation", must be one of: Name, Description, Owner, LastAccessTime, LastAnalyzedTime, Retention, StorageDescriptor, PartitionKeys, ViewOriginalText, ViewExpandedText, TableType, Parameters
您能否告诉我此问题的解决方案?谢谢!
【问题讨论】:
-
我能够解决这些参数问题并更改了爬虫名称。但是现有的爬虫有 AWS Crawler 附加的分区。新更改的爬虫名称未附加分区。如何在更改后的爬虫中附加分区?谢谢!
标签: amazon-web-services amazon-s3 aws-sdk boto3 aws-glue-data-catalog