我正试着用火喉来摄取一些数据。以下是参数:
具有模式的
从this post来看,如果所述表是从现有模式创建的,则火软管似乎无法读取表架构。有人能证实这一点吗?就像在那篇文章中一样,我也收到了错误消息:
架构无效。指定的表没有列。
我的其他选项是使用爬虫或手动创建表。我想自己给这张桌子起名字,所以我想和后者一起去。
是否有办法让Firehose更新Glue中手动创建的表的架构,还是Crawler是我唯一的选择?
我也可以在胶水工作中自己做地板转换,但如果可能的话,我宁愿做火龙带。
发布于 2022-10-11 08:28:33
这是可能的,但在使用使用胶水模式创建的第一个表中的列创建第二个表时,您需要使用一些麻烦的解决方法。然后,您可以使用消防软管配置中的第二个表将数据类型转换为您想要的任何数据类型:
resource "aws_glue_catalog_table" "table_from_schema" {
name = "first_table"
database_name = "foo"
storage_descriptor {
schema_reference {
schema_id {
schema_arn = aws_glue_schema.foo_schema.arn
}
schema_version_number = aws_glue_schema.foo_schema.latest_schema_version
}
}
}
resource "aws_glue_catalog_table" "table_from_first_table_that_can_be_used_with_firehose" {
name = "second_table"
database_name = "foo"
storage_descriptor {
dynamic "columns" {
for_each = aws_glue_catalog_table.table_from_schema.storage_descriptor[0].columns
content {
name = columns.value.name
type = columns.value.type
}
}
}
}https://stackoverflow.com/questions/69817671
复制相似问题