Module Comment

Module Comment

am 08.11.2007 18:40:57 von dbijcl

Fellow DBI Users,

I am planning to release a module, DBIx::JCL, "DataBase Interface
eXtension Job Control Library". This module will (hopefully) fill the
need for a module to provide job creation support for database tasks.
The module will provide:

* Simplified interface to the DBI, with many high-level functions for
database access.
* Support for storing job information in external properties files,
including all sql used by the job.
* Support for notification (email, paging).
* Support for log file creation, rotation, and aging.
* A plugin interface.
* Job execution and management.
* External storage of database connection information.
* Command line support for jobs.

In effect, the module provides an application development framework
for writing database access jobs (scripts).

Your comments, suggestions, etc respectfully requested.

--
Brad Adkins
dbijcl@gmail.com

Re: Module Comment

am 08.11.2007 18:58:33 von Greg

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> In effect, the module provides an application development framework
> for writing database access jobs (scripts).
>
> Your comments, suggestions, etc respectfully requested.

Examples or pseudo-code would be good.

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200711081257
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B90 6714964AC8
-----BEGIN PGP SIGNATURE-----

iD4DBQFHM04EvJuQZxSWSsgRAyKxAJ9S0e/5cOhXLgx4DNr13zNEw3zCVQCY iSJO
64QFCqsjKc/fRT5e/EpTow==
=qLya
-----END PGP SIGNATURE-----

Re: Module Comment

am 08.11.2007 20:04:28 von dbijcl

------=_Part_8472_22918531.1194548668504
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

>
> > Examples or pseudo-code would be good.
>
> Here is an example, with proper config entries, this could run and do real
> work. This particular example selects rows of data from a data warehouse,
> and inserts the result set into a data mart. After that is complete, it
> counts rows to verify that eveything performed as expected. Config access,
> logging, error notification, all provided from config entries common to the
> environment, but overrides on a per job basis supported (not shown here).
>
> #!perl/bin/perl
>
> use strict;
> use warnings;
> use DBIx::JCL qw( :all );
>
> ## initialization
>
> my $jobname = 'sample_job'; ## identifies job config file
> sys_init( $jobname );
>
> my $db_ware = 'datawarehouse'; ## warehouse virtual name
> my $db_mart = 'datamart'; ## datamart virtual name
>
> my $sql_select = sys_get_sql('select' ); ## get our sql
> my $sql_insert = sys_get_sql('insert' ); ## get our sql
> my $sql_count = sys_get_sql('count' ); ## get our sql
>
> ## main
>
> log_info( sys_get_dbdescr( $db_ware ) ); ## message to the log
> log_info( sys_get_dbdescr( $db_mart ) ); ## message to the log
>
> db_connect( $db_ware );
> db_connect( $db_mart );
>
> db_prepare( $db_ware, $sql_select );
> db_prepare( $db_mart, $sql_insert );
>
> db_truncate( $db_mart, 'SAMPLE_TABLE' ); ## trunc SAMPLE_TABLE
> db_execute( $db_ware );
>
> db_insert_from_query( $db_ware, $db_mart ); ## insert result set
> db_commit( $db_mart );
>
> ## verify results
>
> my $count_ware = db_rowcount_query( $db_ware, $sql_count );
> log_info( "Rows retrieved from Data Warehouse: $count_ware" );
>
> my $count_mart = db_rowcount_table( $db_mart, 'SAMPLE_TABLE' );
> log_info( "Rows inserted into Data Mart: $count_mart" );
>
> if ( $count_ware != $count_mart ) {
> sys_die( 'Error comparing source and target record counts' );
> }
>
> ## end
>
> sys_end();
>
> exit sys_get_errorlevel();
>
> __END__
>



--
Brad Adkins
dbijcl@gmail.com

------=_Part_8472_22918531.1194548668504--