CloudFront 访问日志问题

CloudFront 访问日志问题

我尝试使用 Athena 查询我们的 CloudFront 日志,但出现错误,没有收到任何结果。我尝试使用的查询是:

SELECT *

FROM cloudfront_logs

WHERE request_id =
> '-to3QjS9nkb5NDT9BQpAE1LYCz5QAMYUnQvrp_sJTSaxQNCPxoFYVqLw=='

我用了:

CREATE EXTERNAL TABLE IF NOT EXISTS default.cloudfront_logs (
>   `date` DATE,
>   time STRING,
>   location STRING,
>   bytes BIGINT,
>   request_ip STRING,
>   method STRING,
>   host STRING,
>   uri STRING,
>   status INT,
>   referrer STRING,
>   user_agent STRING,
>   query_string STRING,
>   cookie STRING,
>   result_type STRING,
>   request_id STRING,
>   host_header STRING,
>   request_protocol STRING,
>   request_bytes BIGINT,
>   time_taken FLOAT,
>   xforwarded_for STRING,
>   ssl_protocol STRING,
>   ssl_cipher STRING,
>   response_result_type STRING,
>   http_version STRING,
>   fle_status STRING,
>   fle_encrypted_fields INT,
>   c_port INT,
>   time_to_first_byte FLOAT,
>   x_edge_detailed_result_type STRING,
>   sc_content_type STRING,
>   sc_content_len BIGINT,
>   sc_range_start BIGINT,
>   sc_range_end BIGINT
> )
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY '\t'
> LOCATION 's3://cloudfront-logs-site.s3.amazonaws.com/'
> TBLPROPERTIES ( 'skip.header.line.count'='2' )

创建表格。有人能建议我应该更改什么吗?这真的很合适。在此处输入图片描述

我收到的查询输出: 在此处输入图片描述

相关内容