ApacheLogParser Example 2: Common logformat - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.00
1.0
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantage™

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