Comments (3)
Here's how I had to adjust the schema and regex in order to get the table to include log entries containing 504 responses:
CREATE EXTERNAL TABLE IF NOT EXISTS default.elb_logs (
`request_timestamp` string,
`elb_name` string,
`request_ip` string,
`request_port` int,
`backend_ip_port` string,
`request_processing_time` double,
`backend_processing_time` double,
`client_response_time` double,
`elb_response_code` string,
`backend_response_code` string,
`received_bytes` bigint,
`sent_bytes` bigint,
`request_verb` string,
`url` string,
`protocol` string,
`user_agent` string,
`ssl_cipher` string,
`ssl_protocol` string
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'
WITH SERDEPROPERTIES (
'serialization.format' = '1',
'input.regex' = '([^ ]*) ([^ ]*) ([^ ]*):([0-9]*) ([^ ]*) (-1|[.0-9]*) (-1|[.0-9]*) (-1|[.0-9]*) (-|[0-9]*) (-|[0-9]*) ([-0-9]*) ([-0-9]*) \"([^ ]*) ([^ ]*) (- |[^ ]*)\" (\"[^\"]*\") ([A-Z0-9-]+) ([A-Za-z0-9.-]*)$'
) LOCATION 's3://your_log_bucket/prefix/AWSLogs/AWS_account_ID/elasticloadbalancing/'
TBLPROPERTIES ('has_encrypted_data'='false')
from amazon-athena-user-guide.
Hi gilly3!
Sorry for the delays in responding. Thank you for reaching out. You raised absolutely valid points and we are looking into it. I will post here once I have more information, hopefully shortly. Thanks again for writing to us! Will keep it open for now.
from amazon-athena-user-guide.
Hi Ivan,
I consulted with the team and they agreed with your issue. Thank you for reporting it. They suggested a slightly different REGEX. Please see the updated topic with the example query. I will close this request without accepting a pull request, only because their solution is different, even though it addresses the same issue. Please do write back to us and let us know if you notice other issues! Thank you, as always. Also, I am sorry for the delays!
from amazon-athena-user-guide.
Related Issues (20)
- Add Partitioning config for cloudtrail logs HOT 1
- Getting started misses the workgroup needed information HOT 3
- ST_Point does not work with WKT HOT 4
- Upper limit on the number of partitions in a single "DROP PARTITION" request? HOT 1
- Using PrivateLink endpoints with ODBC HOT 4
- STRING omitted from list of data_types HOT 3
- Button "Edit this page on GitHub" doesn't work at "Changing Athena Engine Versions" page. HOT 2
- use Partition Projection for AWS Service Logs examples HOT 1
- Documentation misrepresents syntax for bucket_by & partition_by in create table as HOT 1
- Unable to run the example at geospatial-example-queries HOT 5
- WAF logs partitioning doesn't match Firehose partitioning scheme HOT 1
- No CREATE TABLE with partition projection for VPC flow logs HOT 1
- Querying ALB logs with partition HOT 3
- typo in documentation for setting up elb. HOT 1
- ST_Point does not work with column names HOT 1
- JDBC Jars Corrupted. HOT 8
- Likely missing permission "glue:GetDatabases" HOT 1
- No arm64 macOS ODBC driver? HOT 4
- [docs] add `db_name` in `SELECT * FROM "table_name$partitions" ORDER BY column_name`
- [docs] Add port open guide in JDBC & ODBC HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-athena-user-guide.