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 8059681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:44:57+00:00 2026-06-05T09:44:57+00:00

I have numerous csv files that will form the basis of a mysql database.

  • 0

I have numerous csv files that will form the basis of a mysql database. My problem is as follows:

The input CSV files are of the format:

TIME | VALUE PARAM 1 | VALUE PARAM 2 | VALUE PARAM 3 | ETC.
0.00001 | 10 | 20 | 30 | etc.

This is not the structure I want to use in the database. There I would like one big table for all of the data, structured something like:

TIME | PARAMETER | VALUE | Unit of Measure | Version

This means that I would like to insert the combination of TIME and VALUE PARAM 1 from the CSV into the table, then the combination of TIME and VALUE PARAM 2, and so on, and so on.

I haven’t done anything like this before, but could a possible solution be to set up a BASH script that loops through the columns and on each iteration inserts the combination of time + value into my database?

I have a reasonable understanding of mysql, but very limited knowledge of bash scripting. But I couldn’t find a way out with the mysql LOAD DATA INFILE command.

If you need more info to help me out, I’m happy to provide more info!

Regards,

Erik

  • 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-05T09:44:58+00:00Added an answer on June 5, 2026 at 9:44 am

    i do this all day, every day, and as a rule, have the most success with the least headaches by using LOAD DATA INFILE to a temporary table, then leveraging the power of mySQL to get it into the final table/format successfully. Details at this answer.

    To illustrate this further, we process log files for every video event of 80K highschools/colleges around the country (that’s every pause/play/seek/stop/start for 100’s of thousands of videos).

    They’re served from a number of different servers, depending on the type of videos (WMV, FLV, MP4, etc.), so there’s some 200GB to handle every night, with each format having a different log layout. The old way we did it with CSV/PHP took literally days to finish, but changing it to LOAD DATA INFILE into temporary tables, unifying them into a second, standardized temporary table, then using SQL to group and otherwise slice and dice cut the execution time to a few hours.

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

Sidebar

Related Questions

I have CSV files that contain numerous values that I want to reference. I
I have numerous functions (unknown at design time) that each take a specific number
I'm creating a Django powered website that will have numerous applications (Blog, Shop, Portfolio,
I am building a php+mysql site which will have numerous articles. I am pretty
I have numerous text files of data in the form of float numbers. I'm
I have numerous XML files that are organized into different directories. I need to
i have strange problem doing reporting: i have numerous clients with different issued invoices.
In my program I have numerous Entity classes with a Texture2D attribute that are
We are using jQuery in our project. We have numerous custom javascript files in
I have included numerous coldfusion and html files in CFM pages using the <cfinclude>

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.