CQL data access
Use the CqlNativeStorage handler with the new input_cql statement or use the output_query statement that was available in earlier releases.
In DataStax Enterprise 4.5.2, to access data in CQL tables, use the CqlNativeStorage handler with the new input_cql statement or use the output_query statement that was available in earlier releases.
In DataStax Enterprise 4.5.0-4.5.1, to access data in CQL tables, use the CqlStorage() handler. To access data in the CassandraFS, the target keyspace and table must already exist. Data in a Pig relation can be stored in a Cassandra table, but Pig will not create the table.
- DataStax Enterprise
4.5.2
<pig_relation_name> = LOAD 'cql://<keyspace>/<table>' USING CqlNativeStorage(); -- DataStax Enterprise 4.5.2
- DataStax Enterprise 4.5 - 4.5.1
<pig_relation_name> = LOAD 'cql://<keyspace>/<table>' USING CqlStorage(); -- DataStax Enterprise 4.5.0 - 4.5.1
- int
- long
- float
- double
- boolean
- chararray
<pig_relation_name> = LOAD 'cql://<keyspace>/<table>' USING CqlStorage();
The Pig demo examples include using the LOAD command.
LOAD schema
The LOAD Schema is:
(colname:colvalue, colname:colvalue, … )
where each colvalue is referenced by the Cassandra column name.