DataStax Enterprise 4.0

CQL data access

To use data in CQL tables use the CqlStorage() handler and cql:// url. 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 supports these Pig data types:
  • int
  • long
  • float
  • double
  • boolean
  • chararray
The Pig LOAD statement pulls Cassandra data into a Pig relation through the storage handler. The format of the Pig LOAD statement is:
<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.