Perl query MySQL to csv and send using SFTP


This is a Perl job.

I need a script that can be called from cron or shell and does the following:

- Query a MySQL table to select a set of records.

- If the result is not empty, export all selected records, but just a subset of columns (defined by an array of column names that is hard-coded in the Perl script) to a single csv file (named using a static value plus the current date and time) to a local directory. In the process, convert a few field values (such as converting default date values “0000-00-00” to null values).

- If the csv file was created, connect to an external FTP server (address and login hard coded in the Perl script) using SFTP protocol [<< IMPORTANT] and upload the file to the FTP server.

- Send an email (addresses hard-coded in the Perl script) indicating outcome including date, result (success, ftp connection error, no records, etc), and number of records found in the query.

The server is Linux. Any Perl modules can be installed.

It needs to be well commented especially the query, column subset, ftp info, and email info areas (so I can edit them).

Please don’t propose/use an existing third-party script. I don’t want all the baggage of a “full-featured” script that does 20 things when all I need is the few simple things above. If you really want to use existing scripts, they must be open source and you need to package them in a way that the excess code is removed or “hidden” -- AND YOU NEED TO EXPLAIN THEM IN YOUR BID or else I’ll assume you’re using none.



Skills: Linux, Perl

See more: perl mysql csv, perl query csv, mysql csv perl, perl export mysql table csv, perl export csv, convert mysql csv perl, mysql export csv perl, parse process mysql query results using shell script, send mail csv linux, perl export mysql csv, cron send csv, perl mysql empty query, perl sftp cron, perl export mysql query csv, mysql csv using perl, scripts send records sftp, n query, named query, login modules, job values

About the Employer:
( 88 reviews ) Durham, United States

Project ID: #254058

Awarded to:


Please see PM

$50 USD in 1 day
(6 Reviews)

12 freelancers are bidding on average $58 for this job


can create this

$50 USD in 1 day
(100 Reviews)

Hi. That's my specialty. Please check PM.

$70 USD in 2 days
(173 Reviews)

can help you. tnx.

$50 USD in 1 day
(81 Reviews)

Hi , I'd Like to pleasure you with my rich perl programming experiences since 1996. We are developer of LookMyPC, can can give you support over LookMyPC. pls check pm for more

$35 USD in 2 days
(4 Reviews)

kindly check PM.

$70 USD in 4 days
(7 Reviews)

Hi, see PM, please.

$60 USD in 1 day
(7 Reviews)

Hi sir, Happy to collaborate with you, plz see PM;

$45 USD in 0 days
(2 Reviews)

I can do that for you sir.

$40 USD in 0 days
(1 Review)

Hi Thr, Like to take up this and can assure you 100%satisfaction and timely, bug free delivery. Please see my PM.

$40 USD in 2 days
(0 Reviews)

i'ld like t o do the job, money is not a problem.

$30 USD in 0 days
(0 Reviews)

Quality Guaranteed.

$120 USD in 4 days
(0 Reviews)

What a fun little project to do. I can definitely supply what you need. Look forward to hearing from you.

$80 USD in 4 days
(0 Reviews)