Activity - sqlBulkLoadRowSet
Activity Type: Relational
Description
Bulk load a database table with data from a RowSet XML document (as, for example, produced by the output from an sqlQueryStatement activity).
Example
<sqlBulkLoadRowSet name="bulkLoad">
<webRowSetStream from="dataToInsert"/>
<loadIntoTable tableName="newTable" transactionally="false"/>
<resultStream name="results"/>
</sqlBulkLoadRowSet>
Specification
Element sqlBulkLoadRowSet:
- Attribute name - unique name for the activity within the scope of a request.
- Element webRowSetStream (required) - stream from which the RowSet XML to be bulk-loaded originates.
- Element loadIntoTable (optional) - table into which the data is to be loaded.
- Attribute tableName - name of the database table.
- Attribute transactionally (optional) - a boolean attribute indicating whether the bulk load should be performed as a single transaction. If this attribute is omitted, the default is to perform it as a transaction. One of the implications of performing the bulk load as a transaction is that if an error occurs when loading any one of the rows, then the loading of all of the rows will be aborted.
- If this element is omitted then the data will be loaded into a new table with the same name as the first column of the input data.
-
resultStream (required) - output stream, which will output the number of rows loaded into the table.
- Attribute name - name of the activity's output stream.
Limitations
The default implementation of this activity does not work with Oracle databases.
Data Resource Accessor
This activity requires a data resource accessor that implements the following interface: uk.org.ogsadai.dataresource.JDBCConnectionProvider
Input and Output Types
XML Schema
OGSA-DAI/schema/ogsadai/xsd/activities/sql_bulk_load_rowset.xsd
Class
uk.org.ogsadai.activity.sql.SQLBulkLoadRowSetActivity
Client Toolkit Class
uk.org.ogsadai.client.toolkit.activity.sql.SQLBulkLoad