0

我想将我的 S3 存储桶中的日志文件加载到 Hive 表中,但这些日志位于我的 S3 存储桶中的不同子文件夹中(abc-def/PMTA/2013/xxx,yyy,zzz 子文件夹)。我正在使用以下 hive 命令,但它不会向其中加载任何数据:

CREATE EXTERNAL TABLE pmtalograw(
                                 type STRING,
                                 timeLogged STRING,
                                 timeQueued STRING,

ROW FORMAT delimited fields terminated by ',' STORED AS TEXTFILE

LOCATION 's3://abc-def/PMTA/2013';
4

1 回答 1

0

创建一个 HIVE 的表并将 PMTA 日志的内容加载到表中:

CREATE EXTERNAL TABLE pmtalograw(
type STRING,
timeLogged STRING,
timeQueued STRING,
timeImprinted STRING,
origin STRING,
recipient STRING,
orcpt STRING,
dsnAction STRING,
dsnStatus STRING,
dsnDiag STRING,
dsnMta STRING,
bounceCat STRING,
srcType STRING,
srcMta STRING,
dlvType STRING,
dlvSourceIp STRING,
dlvDestinationIp STRING,
dlvEsmtpAvailable STRING,
dlvSize STRING,
vmta STRING,
jobId STRING,
envId STRING)
ROW FORMAT delimited fields terminated by ',' STORED AS TEXTFILE

LOCATION 's3://abc-def/PMTA/Logs'; 
于 2013-09-25T12:19:01.690 回答