Over a million developers have joined DZone.

How To Produce Daily Database Table Dumps In CSV Format

·
The following code demonstrates how to produce CSV files with dynamic
file name pattern based on a current day. The produced files have the following naming format:
TABLE_NAME_MM_DD_YYYY.csv




     
        table_name=test
    
    
    
     
        SELECT * FROM ${table_name}
        
    


Use Scriptella ETL to run the example. 

See How to execute an ETL file from command line, Ant or directly from Java .
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}