Control Glue Crawlered table names

0

Hello! I wondered is there a way to have control over the crawled glue tables names instead of the folder name? For example, I have a bucket called org-team-users-data then I use a glue crawler on this bucket and would want the table name to be users-data instead of the default bucket name

If not is there a way to rename it in Athena and keep it somehow linked to the crawler?

已提问 9 个月前434 查看次数
1 回答
0

Hello,

Unfortunately, we do not have control over the Glue data catalog table names that are created by crawler at the moment. It is as you have pointed out, inferred from the folder name where the underlying data is present.

It is also not possible to update/rename the Glue data catalog table name of the existing table.

If you need this to be present for your use case at any cost, the procedure would be quite cumbersome. To achieve this, you have to recreate a new table by using the Athena DDL of the table that has already been created and then change the name of the new table to a desirable one of your choice(you can slo do this using CreateTable API call too)

Now create the crawler and point the crawler to this new table, this crawler will infer schema from the underlying S3 location and then update the table we have created.

If you already are aware of the initial schema of the underlying S3 data, formulate an Athena DDL with the table name of your choice for the same and then create a crawler to point to this table directly. If you are not aware of the schema, the above method is the only way forward.

AWS
Aravind
已回答 9 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则