1.0 - 8.00 - ApacheLogParser Example 2: Common logformat - Teradata Vantage

Teradata® Vantage Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.0
8.00
Release Date
May 2019
Content Type
Programming Reference
Publication ID
B700-4003-098K
Language
English (United States)

SQL Call

The common log format excludes some columns from the default extended format.

SELECT * FROM ApacheLogParser (
  ON apache_logs
  USING
  TargetColumn ('logdata')
  LogFormat ('%h %l %u %t \"%r\" %>s %O')
  SearchInfoFlag ('true')
) AS dt ORDER BY remote_user;

Output

The Referer, User-Agent name, search engine and search terms are absent in the common log format output.

remote_host remote_log_name remote_user request_time requested_page final_status bytes_sent_including_header
127.0.0.1 - - 2000-10-10 13:55:36 /apache_pb.gif 200 2326
69.236.77.51 - Frank 2011-03-26 09:17:31 /about/careers.php 200 5976
168.187.7.114 - Lewis 2011-03-27 00:16:49 / 200 7203
75.36.209.106 - Patrick 2008-05-20 15:43:57 / 200 15251