Created
November 5, 2012 21:38
-
-
Save amorton/4020500 to your computer and use it in GitHub Desktop.
CQL 3 Question
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a table and add data in CQL 3 | |
CREATE TABLE UserTweets | |
( | |
tweet_id bigint, | |
user_name text, | |
body text, | |
timestamp timestamp, | |
PRIMARY KEY (user_name, tweet_id) | |
); | |
INSERT INTO | |
UserTweets | |
(tweet_id, body, user_name, timestamp) | |
VALUES | |
(1, 'The Tweet', 'fred', 1352150816917); | |
# Select data in CQL 3 | |
cqlsh:cass_college> select * from UserTweets; | |
user_name | tweet_id | body | timestamp | |
-----------+----------+-----------+-------------------------- | |
fred | 1 | The Tweet | 2012-11-06 10:26:56+1300 | |
# Read data in CLI - ERROR | |
[default@cass_college] get UserTweets['fred']; | |
=> (column=1:body, value=The Tweet, timestamp=1352151358193000) | |
invalid UTF8 bytes 0000013ad2781895 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment