Installation using PIP

Manual Installation from the Sources

Query Example

Tips

uuid1 vs uuid4

uuid1 vs uuid4
uuid1()
Generates a UUID from a host ID, sequence number, and the current time – guaranteed collision free

uuid4()
Generates a random UUID, can collide, chance extermely small

See Stackoverflow Reference: http://stackoverflow.com/questions/1785503/when-should-i-use-uuid-uuid1-vs-uuid-uuid4-in-python

Troubleshooting

1. InvalidRequestException – Invalid version value: 3.0

Fix: Change CQL Version from “3.0” to “3.0.0” in order to fix the following exception

Source: could-not-connect-cql-30

2. Bad Request: line 4:29 mismatched input ‘:’

Fix: Change

TO

in order to fix the following exception

3. error: cannot assign result of function now

Fix: Upgrade Cassandra from Version 1.2.3 to 1.2.4 to fix error

Source: https://issues.apache.org/jira/browse/CASSANDRA-5386

Check Cassandra Version using any of the following commands:

Manually Updgrade Cassandra to 1.2.3
Cassandra version 1.2.4 is currently not yet available in the ubuntu/datax repositories.
A partial upgrade (not safe for production)

Cannot execute this query as it might involve data filtering

Fix: Change query from

TO

Source: http://www.datastax.com/docs/1.2/cql_cli/cql/SELECT

Error:

References

1. Apache Cassandra Home: http://cassandra.apache.org/
2. python-cql Github Home: https://github.com/pcmanus/python-cql
3. python-cql PIP Home: https://pypi.python.org/pypi/cql
4. CQL Tutorial: http://techdocs.acunu.com/v1.1/html/tutorial.html#using-cql
5. Apache Cassandra 1.2 Documentation(PDF): http://www.datastax.com/doc-source/pdf/cassandra12.pdf
6. Cassandra Query Language Manual: http://cassandra.apache.org/doc/cql3/CQL.html
7. Cassandra, CQL3, and Time Series Data With Timeuuid: http://www.rustyrazorblade.com/2012/10/cassandra-cql3-and-time-series-data-with-timeuuid/
8. CQL3 for Cassandra experts:
9. A thrift to CQL3 upgrade guide: http://www.datastax.com/dev/blog/thrift-to-cql3
10. Understanding the Cassandra data model: http://www.datastax.com/docs/1.2/ddl/index
11. Cassandra Data Modeling Best Practices, Part 1: http://www.ebaytechblog.com/2012/07/16/cassandra-data-modeling-best-practices-part-1/
12. PRIMARY KEY’s in CQL: http://planetcassandra.org/blog/post/primary-keys-in-cql
13. CQL3 In Depth: http://www.slideshare.net/yukim/cql3-in-depth
14. CQL and Timeseries Schema: http://stackoverflow.com/questions/13500216/cql-and-timeseries-schema
15. Advanced Time Series with Cassandra: http://www.datastax.com/dev/blog/advanced-time-series-with-cassandra
16. Secondary Index ought to have low cardinality: http://en.wikipedia.org/wiki/Cardinality_(SQL_statements)

About Gugulethu Ncube

IT enthusiast getting things done.