NAME
DTS::Task::DataPump - a Perl subclass of DTS::Task to represent a DTSDataPumpTask object
SYNOPSIS
use warnings;
use strict;
use DTS::Application;
use Test::More;
use XML::Simple;
my $xml = XML::Simple->new();
my $config = $xml->XMLin('test-config.xml');
my $app = DTS::Application->new( $config->{credential} );
my $package = $app->get_db_package(
{
id => '',
version_id => '',
name => $config->{package},
package_password => ''
}
);
foreach my $datapump ( @{ $package->get_datapumps } ) {
print $datapump->to_string, "\n";
}
DESCRIPTION
DTS::Task::DataPump
implements a convenient way to fetch properties from a DTS DataPumpTask Task object of a DTS Package.
EXPORT
None by default.
METHODS
new
Overrided method from DTS::Task to define additional attributes during object creation. See DTS::Task::new method for more information.
use_single_file_7
Returns true or false depending if errors, source, and destination exception rows are all written to a single ANSI file.
use_source_row_file
Returns true or false depending if source exception rows are written to the source exception file.
use_error_file
Returns true or false if error rows are written to a error file.
overwrite_log_file
Returns true or false if data is overwritten, rather than appended, to file.
abort_on_log_failure
Returns true or false if termination of the data pump if execution logging fails is enable.
use_destination_row_file
Returns true or false if destination exception rows are written to the destination exception file.
use_fast_load
Returns true or false if the use of the FastLoad option (where rows are processed in batches under a single transaction commit) is enabled.
log_is_ansi
Returns true or false if the encoding of the log file is ANSI ASCII.
log_is_OEM
Returns true or false if the encoding of the log file is OEM.
log_is_unicode
Returns true or false if the encoding of the log file is Unicode (UTF-16LE).
always_commit
Returns true or false if the DataPumpTask
task will commit all successful batches including the final batch, even if the data pump terminates. Use this option to support restartability.
Strange as it may seen, this is called as Always commit options in the DTS designer application, but received the name DataPumpOptions
property in the DTS API.
use_check_constraints
Returns true or false if the datapump will check for the constrainst of the table before inserting new rows.
use_keep_nulls
Returns true or false if the datapump will insert will insert NULL values from the data source into the destination.
use_lock_table
Returns true or false if the datapump will lock the entire table instead using lock by page.
use_identity_inserts
Returns true or false if Identity inserts will be used.
to_string
Returns a string with all attributes from the datapump object, separated by new line characters and with a short description of each attribute.
get_input_global_vars
Returns a string or a list of Data Transformation Services (DTS) global variable names that are to be used as parameters in a query or created in a subpackage, depending on the context that the method is invoked.
The returned string is made of the global variable names separated by semi-colons characters.
get_rows_complete
Returns the number of source rows, including rows for which errors occurred, processed by the task or transformation set.
get_exception_file
Returns the file name path where exception rows are written.
get_commit_size
Returns the number of rows that are inserted in a single transaction when the FastLoad option is being used.
get_max_errors
Returns the maximum number of error rows before the data pump terminates.
get_properties
Returns an array reference with the values of the attributes of a DTS::Task::DataPump
in the order as shown below:
- 0 use_single_file_7
- 1 use_source_row_file
- 2 use_error_file
- 3 overwrite_log_file
- 4 abort_on_log_failure
- 5 use_destination_row_file
- 6 use_fast_load
- 7 log_is_ansi
- 8 log_is_OEM
- 9 log_is_unicode
- 10 always_commit
- 11 use_check_constraints
- 12 use_keep_nulls
- 13 use_lock_table
- 14 use_identity_inserts
- 15 get_input_global_vars
- 16 rows_complete
- 17 exception_file
- 18 commit_size
- 19 max_errors
SEE ALSO
DTS::Task, the superclass from where
DTS::Task::DataPump
inherits, atperldoc
.Win32::OLE at
perldoc
.MSDN on Microsoft website and MS SQL Server 2000 Books Online are a reference about using DTS' object hierarchy, but one will need to convert examples written in VBScript to Perl code.
AUTHOR
Alceu Rodrigues de Freitas Junior, <glasswalk3r@yahoo.com.br>
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Alceu Rodrigues de Freitas Junior
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.