Cassandra Translator

Page edited by Steven Hawkins


Changes (1)

...

The Teiid specific Cassandra Resource Adapter should be used with this translator. See [Cassandra Data Sources] for connecting to a Cassandra cluster.

h3. Native Queries

Cassandra source procedures may be created using the teiid_rel:native-query extension - see [Parameterizable Native Queries|Translators#native]. The procedure will invoke the native-query similar to a direct procedure call with the benefits that the query is predetermined and that result column types are known, rather than requiring the use of ARRAYTABLE or similar functionality.

h4. *Native Procedure*

{warning}
This feature is turned off by default because of the security risk this exposes to execute any command against the source. To enable this feature, [override the execution property|Translators#Override Execution Properties] called "SupportsNativeQueries" to true.
{warning}

The Cassandra translator provides a procedure with name *native* that gives ability to execute any ad-hoc CQL queries directly against the source without any Teiid parsing or resolving. Since the metadata of this procedure's results are not known to Teiid, they are returned as object array. [ARRAYTABLE] can be used construct tabular output for consumption by client applications.

{info:tip=Name of the Native Procedure}
By default the name of the procedure that executes the queries directly is called *native*, however user can set [Override Execution Properties|Translators#Override Execution Properties] property on _NativeQueryProcedureName_ in vdb.xml file to change it to any other procedure name.
{info}

Full Content

Cassandra Translator

The Cassandra Translator, known by the type name cassandra, exposes querying functionality to Cassandra Data Sources. The translator translates Teiid push down commands into Cassandra CQL.

Properties

The Cassandra Translator currently has no import or execution properties.

Usage

The Cassandra Translator supports only SELECT statements with a restrictive set of capabilities including: count(*), comparison predicates, IN predicates, ORDER BY, and LIMIT. Consider a custom extension or create an enhancement request should your usage require additional capabilities.

JCA Resource Adapter

The Teiid specific Cassandra Resource Adapter should be used with this translator. See Cassandra Data Sources for connecting to a Cassandra cluster.

Native Queries

Cassandra source procedures may be created using the teiid_rel:native-query extension - see Parameterizable Native Queries. The procedure will invoke the native-query similar to a direct procedure call with the benefits that the query is predetermined and that result column types are known, rather than requiring the use of ARRAYTABLE or similar functionality.

Native Procedure

This feature is turned off by default because of the security risk this exposes to execute any command against the source. To enable this feature, override the execution property called "SupportsNativeQueries" to true.

The Cassandra translator provides a procedure with name native that gives ability to execute any ad-hoc CQL queries directly against the source without any Teiid parsing or resolving. Since the metadata of this procedure's results are not known to Teiid, they are returned as object array. ARRAYTABLE can be used construct tabular output for consumption by client applications.

By default the name of the procedure that executes the queries directly is called native, however user can set Override Execution Properties property on NativeQueryProcedureName in vdb.xml file to change it to any other procedure name.
Stop watching space | Change email notification preferences
View Online | View Changes | Add Comment