cassandra command lines

1. create keyspace

>>create keyspace packt
with replication =
{‘class‘:‘SimpleStrategy‘,‘replication_factor‘:1}

2. create table

>>use packt;>>create table stock_ticker_by_exchange_date {
exchange     varchar,
symbol       varchar,
description  varchar,
tick_date    varchar,
close        decimal,
primary key ((exchange,tick_date), symbol)
}

exchange, tick_date 两个字段作为row key / partition key;

exchange, tick_date, symbol 3个字段作为(compound)primary key,复合主键,称之为wide row;单列主键,称之为skinny row。

默认primary key第一个字段作为row key。

3. cassandra特有的支持集合数据类型

在一个字段中存放小量的数据集,支持set,list,map格式。

时间: 2024-10-15 13:27:00

cassandra command lines的相关文章

How use Instruments and display the console in Command Lines applications

I'm using Xcode on OSX to develop command line C applications. I would also like to use Instruments to profile and find memory leaks. However, I couldn't find a way to display the console when launching the application from within Instruments. I'm al

【转载】Data Science at the Command Line

Data Science at the Command Line Data Science at the Command Line is a new book written by Jeroen Janssens. This website contains information about the upcoming workshop in London, the webcast from August 20th, instructions on how to install the Data

Top 30 Nmap Command Examples For Sys/Network Admins

Nmap is short for Network Mapper. It is an open source security tool for network exploration, security scanning and auditing. However, nmap command comes with lots of options that can make the utility more robust and difficult to follow for new users

Ubuntu安装Cassandra

Uninstall Cassandra $ sudo su remove cassandra $ apt-get remove cassandra cleaned the cassandra folders $ rm -rf /var/lib/cassandra $ rm -rf /var/log/cassandra $ rm -rf /etc/cassandra Install Cassandra Add the DataStax Community repository to the /et

C++: Command Line Processing

Save this code here for studying and using it. Surce code is here. CmdLine.h File #pragma once #include "unicodemacro.h" #include <vector> #include <map> namespace Utility { // handy little container for our argument vector struct Cm

Python著名的lib和开发框架(均为转载)

第一,https://github.com/vinta/awesome-python Awesome Python A curated list of awesome Python frameworks, libraries, software and resources. Inspired by awesome-php. Awesome Python Admin Panels Algorithms and Design Patterns Anti-spam Asset Management A

Machine and Deep Learning with Python

Machine and Deep Learning with Python Education Tutorials and courses Supervised learning superstitions cheat sheet Introduction to Deep Learning with Python How to implement a neural network How to build and run your first deep learning network Neur

Awesome Python

Awesome Python  A curated list of awesome Python frameworks, libraries, software and resources. Inspired by awesome-php. Awesome Python Environment Management Package Management Package Repositories Distribution Build Tools Interactive Interpreter Fi

Python开源框架、库、软件和资源大集合

A curated list of awesome Python frameworks, libraries, software and resources. Inspired by awesome-php. Admin Panels Libraries for administrative interfaces. Ajenti - The admin panel your servers deserve. django-suit - Alternative Django Admin-Inter