Jump to content

[SOLVED] somefile.csv.bz2 to DB help


naskoo

Recommended Posts

Hi,

 

I need to load a *.csv file in a bzip2 archive from a remote server to my database. Is there any option to decompress the archive and read the data from the csv file just with mysql. Something like:

 

LOAD DATA LOCAL INFILE 'http://example.com/Destinations.csv.bz2' INTO TABLE `csv_test` FIELDS TERMINATED BY ';' LINES TERMINATED BY '\n'

 

Or I need to decompress the bz2 to temp *.csv, read the *.csv and add the data to the DB.

 

Thanks in advance!

 

Regards

 

Nasko

Link to comment
https://forums.phpfreaks.com/topic/177424-solved-somefilecsvbz2-to-db-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.