ETLp::File::Read::CSV - audit the execution of an ETLp job
This class is used to manage the job's audit record
use ETLp::File::Read::CSV; my $csv = ETLp::File::Read::CSV->new( filename => "/data/comit/final.csv", fields => [qw/id name score/], csv_options => {allow_whitespace => 1}, localize => 1, ); while (my $fields = $csv->get_fields) { print $csv->line_counter() .": " . $csv->{name}, "\n"; };
Create a File object.
Parameters
Hash or hashref consisting of
* filename: Required. Name of the file to be opened * fields: Required. The fields in the file * csv_options. Optional. Settings for parsing the CSV file. See Text::CSV documentation * localize. Optional. Whether the end of line characters should be converted to the native ones
Returns
* a ETLp::File::Read::CSV object
Extracts the fields from a file
* None
* A hashref where each key is populated with the filed value from the file record
Copyright 2010 Redbone Systems Ltd
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
The terms are in the LICENSE file that accompanies this application
To install ETLp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ETLp
CPAN shell
perl -MCPAN -e shell install ETLp
For more information on module installation, please visit the detailed CPAN module installation guide.