Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9170669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:03:27+00:00 2026-06-17T16:03:27+00:00

I am trying to parse and analyse log files by importing some large CSV

  • 0

I am trying to parse and analyse log files by importing some large CSV files with millions of lines in to SQLite.
I was using my .NET program to achieve the same thing on smaller log files through LINQ with out any database.
But I was facing performance and scalability issues.
Then I found SQLite might be the best option to offload performance issues from my .NET program.
I imported the log files using the following commands from SQLite command line.
(Names are replaced to just avoid providing unnecessary information):

sqlite> Create Table MLogTable(DateTimeC text, Field1 text, Field2 text, Field3 text, Field4 text, Field5 text, Field6 text, Field7 text, Field8 text, Field9 text, Field10 text);      

sqlite> .separator ","

sqlite> .import "D:\\logs\\xyz\\abc.log" MLogTable

The logging mechanism seems to have a problem and i get some incomplete lines in the Log file.
For example:

expected format is (f1, f2, f3 f4, f5, f6, f7, f8, f9 ,f10, f11)

but actual format of few lines is (f1, f2)

So the log file has few lines(out of millions of lines) not as expected and on import it results the following kind of error:

Error: D:\logs\xyz\abc.log line 4499214: expected 11 columns of data but found 2

The number of erroneous lines is very less and i have no control over how it can be corrected while logging.
So those lines need to be ignored while SQLite import is done.
Is it possible with SQLite?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:03:28+00:00Added an answer on June 17, 2026 at 4:03 pm

    The CSV import function of the sqlite3 command-line tool works only with well-formed CSV files.

    You have to convert the file manually, or write your own importer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to analyze logs using splunk and I need to parse lines that
I trying to parse some xml in Google Refine using Jython and ElementTree but
Im trying to parse some html tags using perl module Web::Scraper but seems Im
Trying to parse an HTML document and extract some elements (any links to text
Trying to parse some XML but apparently this is too much for a lazy
Im trying to parse the string located in /proc/stat in a linux filesystem using
im trying to parse the XML returned by Google contacts API i made some
I'm trying to parse a CSV file in C#. Split on commas (,). I
Trying to parse some XML and then insert specific parts into various HTML elements.
Trying to parse a YouTube feed using PHP simplexml_load_file(); I am able to access

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.