抓取工具正在创建名称后缀奇怪的 table

Crawler is creating a table with weird suffix to the name

我们有一个 ETL 脚本,它读取数据表单目录并将 s3 作为镶木地板写入。我们还在 Athena 中调用 create/update table 的爬虫。但是,它正在创建 table 但在 table 名称中添加了一些奇怪的后缀。

我正在抓取的文件夹中的所有文件都在具有相同架构的镶木地板中。此外,只有当我们从 ETL 脚本调用爬虫时才会发生这种情况。

我们用来调用爬虫的脚本

glue_client = boto3.client("glue", region_name=args.get("aws_region"))
glue_client.start_crawler(Name=args["crawler_name"])

预计:table_name 实际:table_name_31e198c8c61861f127ae06487eb14a3f

当 Glue 爬虫在 Glue 数据目录中遇到重复的 table 名称时,就会发生这种情况。请参阅讨论此行为的 doc

如果遇到重复的 table 名称,爬虫会在名称中添加哈希字符串后缀。