MySQL Forums
Forum List  »  Newbie

Re: Importing Tomcat Access Log
Posted by: Andrew Taylor
Date: February 04, 2015 08:26AM

Sorry I miss spoke. So the fields are space delimited and the lines are linefeed delimited. I have made progress on this. The issue I have now is one field is ecapsulated by "" and inside the quotes there is a space. Which SQL is interpreting as another field. Below is the data requested. My apologies for not supplying it earlier.

Picture of the table in MySQL workbench


Lines of Sample data
128.1.1.20 - - [03/Feb/2015:00:00:00 -0600] "GET /isweb/servlet/PrintFilePollingServlet?id=248504470001111CC536F.ipf&version=2.01.01&pc=001111CC536F HTTP/1.1" 200 45 "-" "Java/1.7.0_40"

128.1.1.243 - - [03/Feb/2015:00:00:00 -0600] "GET /isweb/servlet/PrintFilePollingServlet?id=6967057597C0507ACC6EA.ipf&version=2.01.01&pc=7C0507ACC6EA HTTP/1.1" 200 45 "-" "Java/1.7.0_40"

Query I am currently using
load data infile '/tmp/sql/iweb.txt'
into table StandardGolfIweb
fields terminated by ' ' optionally enclosed by ""
lines terminated by '\r\n';

Results of query

Options: ReplyQuote


Subject
Written By
Posted
February 03, 2015 05:01PM
February 04, 2015 06:29AM
Re: Importing Tomcat Access Log
February 04, 2015 08:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.