【问题标题】:Remove/Rename Special Character while creating column name using AWS Glue Crawler使用 AWS Glue Crawler 创建列名称时删除/重命名特殊字符
【发布时间】:2021-10-14 16:49:45
【问题描述】:

我正在使用 AWS Glue 爬虫来爬取 S3 存储桶,该爬虫在 Athena 中创建表架构。 我了解 Athena 不支持具有特殊字符(如(反斜杠)等)的列名。 他们是一种可以在爬虫从 S3 存储桶爬取时排除/重命名这些列名的方法。 我有几个列名称,例如 (RelatedAWSResources:0/name),当我在 Athena 中查询时,这给了我错误。 任何帮助表示赞赏。

【问题讨论】:

  • @Marcin:这样做的理想方式是什么?删除 Glue ETL 作业中的特殊字符或使用 lamda 在 Kinesis firehose 中的数据转换中删除它?

标签: amazon-web-services amazon-ec2 aws-glue aws-glue-data-catalog


【解决方案1】:

遗憾的是,没有这样的方法。您可能要做的是设置 AWS Glue Job,并将所有数据转换为适合 Athena 的格式。

【讨论】:

  • 在 Glue 爬虫从 S3 存储桶中爬取数据后,是否可以编写 AWS Glue 作业以在作业中使用 python 脚本将多行 json 转换为单行 json,因为 AWS Athena 期望 json 数据在单行?
  • @user662285 是的,您可以使用 AWS Glue 作业进行任何编程。
  • @user662285 我建议用相关的细节和例子提出一个新的问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-05-19
  • 2017-12-20
  • 2023-04-03
  • 2020-05-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多