gpt4 book ai didi

amazon-web-services - 显示数据引号的 AWS Glue/数据目录

转载 作者:行者123 更新时间:2023-12-05 01:41:21 26 4
gpt4 key购买 nike

当我使用 Athena 从 Data Catalog 查询我的文件时,所有数据都用引号引起来。是否可以删除这些引号?

enter image description here

我尝试在表格设置中添加 quoteChar 选项,但没有帮助

enter image description here

更新

根据要求,DDL:

CREATE EXTERNAL TABLE `holidays`(
`id` bigint,
`start` string,
`end` string,
`createdat` string,
`updatedat` string,
`deletedat` string,
`type` string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
WITH SERDEPROPERTIES (
'quoteChar'='\"')
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
's3://pinfare-glue/holidays/'
TBLPROPERTIES (
'CrawlerSchemaDeserializerVersion'='1.0',
'CrawlerSchemaSerializerVersion'='1.0',
'UPDATED_BY_CRAWLER'='pinfare-holidays',
'averageRecordSize'='84',
'classification'='csv',
'columnsOrdered'='true',
'compressionType'='none',
'delimiter'=',',
'objectCount'='1',
'recordCount'='29',
'sizeKey'='2494',
'skip.header.line.count'='1',
'typeOfData'='file')

最佳答案

我知道已经晚了,但我认为问题出在“Serde 序列化库”在

AWS GLUE --> Click on the table --> Edit Table --> check "Serde serialization lib"it's value should be "org.apache.hadoop.hive.serde2.OpenCSVSerde"

Than Click Apply

这应该可以解决您的问题。以下是供您引用的示例图片。

enter image description here

关于amazon-web-services - 显示数据引号的 AWS Glue/数据目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54567321/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com