ApacheLogParser Output - Teradata Vantage

Teradata® Vantage Machine Learning Engine Analytic Function Reference

Teradata Vantage
Release Number
May 2019
English (United States)
Last Update
Product Category
Teradata Vantage

Output Table Schema

The table has one row for each input row that the function parses, except those that contain requested files of excluded types. Its schema depends on the log format and function arguments. The following table is a possible output table schema.

Column Data Type Description
remote_host VARCHAR Remote host that made HTTP request.
remote_log_name VARCHAR Log name on remote host.
remote_user VARCHAR User logged into remote host.
request_time TIMESTAMP Timestamp when HTTP request was made.
requested_page VARCHAR Requested landing page.
final_status INTEGER Status for request that was internally redirected. Applies to final request, not original request.
bytes_sent_including_header INTEGER Response size in bytes in Custom Log Format (CLF).
referrer VARCHAR URL from which request was initiated.
request:User-Agent VARCHAR Information about system from which request was initiated.

Possible Output Columns

The following two tables list the possible output column names.

The first table shows the mapping between request characteristics in the format string (log items) and table column names, and gives output examples.

The second table describes the output table columns that appear only if the SearchInfoFlag argument is true and the log file contains referrer information.

ApacheLogParser Item-Name Mapping
Log Item Column Output Example
%h remote_host
%a remote_IP
%A local_IP
%t request_time [22/Jun/2012:17:27:02 -0700]
%b bytes_sent_CLF 512
%B bytes_sent 455
%O bytes_sent_including_header 512
%I bytes_received_including_header 512
%p canonical_server_port 80
%{canonical}p canonical_server_port 80
%{local}p actual_server_port 80
%{remote}p actual_client_port 7777
%P process_ID 8311
%k live_connections 2
%D request_duration_microseconds 312
%T request_duration_seconds 0
%U requested_URL /index.html
%l remote_log_name  
%u remote_user  
%f requested_file  
%{VARNAME}i request:VARNAME  
%{Referer}i Referer  
%V server_name  
%v canonical_server_name  
%L log_ID  
%H protocol HTTP/1.1
%m method GET
%q query  
%X connection_status X = Connection aborted before the response completed.

+ = Connection may be kept alive after the response is sent.

- = Connection closes after the response is sent.

%r request_line  
%>s final_status 404
%<s original_request_status  
%s original_request_status  
%R handler  
ApacheLogParser Output Columns Extracted, RETURN_SEARCH_INFO ('true')
Column Data Type Description
search_engine VARCHAR Name of search engine referrer (Google, Bing, or Yahoo) if log file contains that information; otherwise blank.
search_terms VARCHAR Search terms that led to landing on page.