Activity - sqlResultToBytes

Activity Type: Relational

Description

Converts a BLOB (or similar) column of the result of an SQL Query or a stored procedure into a stream of byte arrays. The activity will output output data from a single specified column of the first row of the input result set. If the input result set contains more than one row all rows except the first will be ignored.

This activity is useful if you wish to deliver data held in a BLOB to delivery activities such as deliverToURL, deliverToGFTP or outputStream .

Example

<sqlResultToBytes name="myActivityInstance">
<resultSet from="resultSetStream"/>
<columnIndex value="1"/>
<blockSize value="2000"/>
<outputStream name="byteStream"/>
</sqlResultToBytes>

Specification

Element sqlResultToBytes:

Input and Output Types

Data Resource Accessor

This activity can operate with any data resource accessor.

XML Schema

OGSA-DAI/schema/ogsadai/xsd/activities/sql_result_to_bytes.xsd

Class

uk.org.ogsadai.activity.sql.SQLResultToBytesActivity

Client Toolkit Class

uk.org.ogsadai.client.toolkit.activity.sql.SQLResultToBytes