Was this helpful?
Apache Common Logfile Format
The Apache Software Foundation develops open source software for Windows and Linux operating systems. One of the Foundation's most popular projects is the Apache HTTP Server Project, which provides HTTP services in accordance with current HTTP standards. The Apache HTTP Server produces several different log files, one of which is the Common Log Format (CLF) file. Map Editor can read Apache Common Logfile Format files using the ASCII (Delimited) connector but cannot write to these files as targets.
See Also
Apache Common Logfile Format Parameters
The Apache Common Logfile contains a separate line for each request (LF or CR/LF record separators depending on platform). A line is composed of several tokens separated by spaces:
remotehost ident authuser date request status bytes
If a token does not have a value, then it is represented by a hyphen (-). The meanings and values of these tokens are as follows:
remotehost
The fully-qualified domain name of the client, or its IP number if the name is not available.
ident
If IdentityCheck is enabled and the client machine runs identd, then this is the identity information reported by the client.
authuser
If the request was for a password-protected document, then this is the user ID used in the request. May be bogus if status is 401.
date
The date and time of the request, encapsulated in square brackets, in the following format:
date = [day/month/year:hour:minute:second zone]
day = 2*digit
month = 3*letter
year = 4*digit
hour = 2*digit
minute = 2*digit
second = 2*digit
zone = ('+' | '-') 4*digit
request
The request line from the client, enclosed in double quotes (").
status
The three-digit status code returned to the client.
bytes
The number of bytes in the object returned to the client, not including any headers.
Example
http://www.interse.com/ - bob [08/Aug/1995:06:00:00 -0800]
"GET /analyst/ HTTP/1.0" 200 1067
Property Options
You can set the following source (S) and target (T) properties.
Property
S/T
Description
AlternateFieldSeparator
S
Most data files have only one field separator between all the fields; however, it is possible to have more than one field separator. If your source file has one field separator between some of the fields and a different separator between other fields, you can specify the second field separator here. Otherwise, you should leave the setting at None (the default).
The alternate field separators available from the list are none (default), comma, tab, space, carriage return-line feed, line feed, carriage return, line feed-carriage return, ctrl-R, and pipe (|). To select a separator from the list, click AlternateFieldSeparator. If you have an alternate field separator other than one from the list, you can type it here.
If the alternate field separator is not one of the listed choices and is a printable character, highlight the CR-LF and then type the correct character. For example, if the separator is an asterisk, type an asterisk from the keyboard.
If the field separator is not a printable character, replace CR-LF with a backslash, an X, and the hexadecimal value for the separator. For example, if the separator is a check mark, then enter \XFB. For a list of the 256 standard and extended ASCII characters, search for "hex values" in the documentation.
AutomaticStyling
S
By default, AutomaticStyling is set to false, causing all data to be read or written as Text. When set to true, it reads and formats particular data types, such as numeric and date fields, automatically.
During the transformation process, autostyling insures that a date field in the source file is formatted as a date field in the target file, as opposed to character or text data. If your source file contains zip code data, you may want to leave AutomaticStyling as false, so leading zeros in some zip codes in the eastern United States are not deleted.
FieldEndDelimiter
S
All Apache Common Logfile Format files are presumed to have beginning-of-field and end-of-field delimiters. The default delimiter is a quote (") because it is the most common. However, some files do not contain field delimiters, so this option is available for both source files and target files. To read from or write to a file with no delimiters, set FieldEndDelimiter to None.
FieldSeparator
S
An Apache Common Logfile Format file is presumed to have a space between each field. To specify some other field separator, click FieldSeparator to display the list of options. The options are comma (default), tab, space, carriage return-line feed, line feed, carriage return, line feed-carriage return, ctrl-R, a pipe (|), and no field separator. If you have or need an alternate field separator other than one from the list, you can type it here.
If the field separator is not one of the choices from the list and is a printable character, highlight the CR-LF and then type the correct character. For example, if the separator is an asterisk (*), type an asterisk from the keyboard.
If the field separator is not a printable character, replace CR-LF with a backslash, an X, and the hexadecimal value for the separator. For example, if the separator is a check mark, then enter \XFB. For a list of the 256 standard and extended ASCII characters, search for "hex values" in the documentation.
FieldStartDelimiter
S
All Apache Common Logfile Format files are presumed to have beginning-of-field and end-of-field delimiters. The default delimiter is a quote (") because it is the most common. However, some files do not contain field delimiters, so this option is available for both your source files and your target files. To read from or write to a file with no delimiters, set FieldStartDelimiter to None.
Header
S
In some files, the first record is a header record. For source data, you can remove it from the input data and cause the header titles to be used automatically as field names. For target data, you can cause the field names in your source data to automatically create a header record in your target file. To identify a header record, set Header to true. Default is false.
RecordFieldCount
S
If your Apache Common Logfile Format data file has field separators, but no record separator, or if it has the same separator for both the fields and the records, you should specify the RecordSeparator (most likely a blank line), leave the AlternateFieldSeparator option blank and enter the exact number of fields per record in this box. The default value is zero.
RecordSeparator
S
An Apache Common Logfile Format file is presumed to have a carriage return-line feed (CR-LF) between records. To use other characters for a record separator, click the RecordSeparator cell, click the arrow and select a record separator. The list box choices are carriage return-line feed (default), line feed, carriage return, line feed-carriage return, form feed, empty line, ctrl-E, and no record separator.
If the record separator is not one of the choices from the list and is a printable character, highlight the CR-LF and then type the correct character. For example, if the separator is a pipe (|), type a pipe from the keyboard.
If the record separator is not a printable character, replace CR-LF with a backslash, an X, and the hexadecimal value for the separator. For example, if the separator is a check mark, then enter \XFB. For a list of the 256 standard and extended ASCII characters, search for "hex values" in the documentation.
StartOffset
S
If your source data file starts with characters that need to be excluded from the transformation, set the StartOffset option to specify at which byte of the file to begin. The default value is zero. The correct value may be determined by using the Hex Browser.
Note:  This property is set in number of bytes, not characters.
StripLeadingBlanks
S
Strips the leading blanks in all data fields if set to true. Default is false.
StripTrailingBlanks
S
Strips out leading blanks in all data fields if set to true. Default is false.
StyleSampleSize
S
Allows you to set the number of records (starting with record 1) that are analyzed to set a default width for each source field. The default value for this option is 5000. You can change the value to any number between 1 and the total number of records in your source file. As the number gets larger, more time is required to analyze the file, and it may be necessary to analyze every record to ensure no data is truncated.
To change the value, click StyleSampleSize, highlight the default value, and type a new one.
CodePage
S
This translation table determines which encoding to use for reading and writing data. The default is ANSI, the standard in the US.
Field1lsrecTypeId
S
If the first field of each record in your source file contains the Record Type ID, you can select true for this property and Map Designer treats each record as a separate record type. Within each record, field names derived from the Record Type ID are automatically generated for each field.
For example, if your first record consisted of the following:
"Names", "Arnold", "Benton", "Cassidy", "Denton", "Exley", "Fenton"
Map Editor assigns these field names as follows:
Names_01: Names
Names_02: Arnold
Names_03: Benton
Names_04: Cassidy
Names_05: Denton
Names_06: Exley
Names_07: Fenton
NullIndicator
S
This property allows you to enter a special string used to represent null values. You can select predefined values or type any other string.
Target – When writing a null value, the contents of the null indicator string are always written.
Source – A check is made to see if the null indicator is set. If it is set, the data is compared to the null indicator. If the data and the null indicator match, the field is set to null.
EmptyFieldsNull
S
This property allows you to treat all empty fields as null.
NumericFormatNormalization
S
Setting this property to true handles thousands-separators according to usage for locale when numeric strings are converted to numeric type. This property overrides any individual field settings. Supported in 9.2.2 and later. Default is false.
Last modified date: 08/02/2023