【以下的问题经过翻译处理】 你好,
我尝试在 Athena 中运行以下 DDL 语句:
querying GZIP compressed CSV files
出于某种原因,它不会删除第一行,也不会从输出中删除引号字符 (")。
我在 AWS 论坛上找到了一个相关的帖子,其他人也遇到了这个问题:
https://forums.aws.amazon.com/thread.jspa?messageID=755357&threadID=244207&tstart=0
很想听听您对此的看法。
DDL声明:
CREATE EXTERNAL TABLE IF NOT EXISTS table_name_here (
eventID STRING,
userID STRING,
sessionID STRING,
eventDate STRING,
eventTimestamp STRING,
eventName STRING,
eventLevel INT,
gaUserStartDate STRING,
gaUserGender STRING,
gaUserAgeGroup STRING,
gaUserCountry STRING,
gaUserAcquisitionChannel STRING,
msSinceLastEvent STRING,
browserName STRING,
browserVersion STRING,
campaign STRING,
clientVersion STRING,
collectInsertedTimestamp STRING,
convertedProductAmount STRING,
externalUserID STRING,
mainEventID STRING,
network STRING,
operatingSystem STRING,
operatingSystemVersion STRING,
parentEventID STRING,
platform STRING,
productAmount STRING,
productCategory STRING,
productID STRING,
productName STRING,
productType STRING,
realCurrencyAmount INT,
realCurrencyType STRING,
revenueValidated INT,
signupSource STRING,
transactionID STRING,
transactionName STRING,
transactionSourceId INT,
transactionSourceName STRING,
transactionStatus STRING,
transactionType STRING,
transactionVector STRING,
userLevel INT,
userType STRING,
virtualCurrencyAmount INT,
virtualCurrencyName STRING,
virtualCurrencyType STRING,
visitSource STRING
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
LOCATION 's3://path/to/bucket'
TBLPROPERTIES (
"skip.header.line.count"="1",
"quoteChar"='"'
);