Database Reference
In-Depth Information
2.
Let's issue the
assume
command and try to fetch rows from the de-
fault column family in readable format:
assume default(column1) values are text;
assume default(value) values are text;
assume default(key) values are text;
select * from default;
Figure 2-21
shows the result.
Figure 2-21
.
Retrieving after assume function is applied
3.
typeAsBlob
or
blobAsType
functions can also be used to mar-
shal data while running CQL3 queries:
select
blobAsText(key),blobAsText(type),blobAsText(value)
from default;
4.
We can alter the data type of validator as follows:
alter table default alter value type text;
alter table default alter key type text;
Note
The
assume
command will not be available after Cassandra 1.2.X release. As
an alternative we can use
typeAsBlob
(e.g.,
textAsBlob
) CQL3 functions.
Counter Column
Distributed counters are incremental values of a column partitioned across multiple
nodes. Counter columns can be useful to provide counts and aggregation analytics for