Cassandra Parameterized Reader Component

The Cassandra Parameterized Reader component executes queries against the Cassandra instance by constructing a query using the data passed into its queryParameters input channel.  The information in the input data is combined with the queryTemplate to create a complete query that is executed, and whose results are returned on the default output channel.

Data Governance

The Cassandra Parameterized Reader component will register every data item it returns with the Data Governance System.  The returned items are recorded as being derived from the data item that triggers the component.

Input Channels

queryParameters — Receives SimpleMappedData objects that contain the values to substitute into the queryTemplate to form a full query.  The resultant query will be executed against the database and the result sent out via the default output channel. If the input object does not contain enough information to form a complete query, an error is sent out on the error output channel.

Output Channels

default — Outputs each row returned by the query one-at-a-time as a DatabaseRowData. When the last record is returned, the isLast flag of the DatabaseRowData object will be set.

noResults— Outputs a SignalData object if the query executes, and no results are returned.

error — Outputs an ErrorOutput object if there is an error executing the query.

Parameters

resource — (CassandraResource) The resource defining the service to which this component should connect

queryTemplate — (String) The CQL query template sting. The query template uses placeholders of the form :variable, where the name of the variable matches the name of an entry in the SimpleMappedData object received on the queryParameters input channel.  For example, SELECT * FROM Table WHERE foo > :example   , will have the value of the “example” entry substituted in place of :example in the query before it is executed.

consistencyLevel — (String, default: ONE) The Consistency level to use when executing the query.  

rowsToReturnPerCall — (int, default: 10) The number of rows to return per call to the database.  This defaults to 10 to limit the amount of data that is being read into memory at once.

requestTimeout — (int, default: 2) Maximum time, in seconds, before the request times out.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us