keyspace
-
👀 Cassandra Keyspace, Table 스키마 생성(feat. Collection type, User-Defined type 생성)DataBase/Cassandra 2021. 7. 31. 23:53
1. KEYSPACE 생성 및 사용 cqlsh> CREATE KEYSPACE test with replication = {'class': 'SimpleStrategy', 'replication_factor':1}; cqlsh> use test; 2. Table 스키마 생성 cqlsh> CREATE TABLE stat (id text primary key, seedGoodsCode text, w2v_view list, w2v_purchase list, cf_item_to_item list, ml_item_to_item list, regDtm text); 3. 스키마 구조에 맞춰 데이터 삽입 > INSERT INTO stat JSON '{ "id" : "60c93", "seedGoodsCode" : "196..
-
[Cassandra] Tutorial #1DataBase/Cassandra 2021. 2. 9. 23:35
keyspace 조회 > DESC keyspaces keyspace 생성 (keyspace 이름: lab) > create keyspace lab with replication = {'class': 'SimpleStrategy', 'replication_factor':1}; lab keyspace 사용하기 > use lab; ## cqlsh 실행 cqlsh:lab> movies data로 DB 생성하기 Table 생성 > create table lab.movies (movie_id int primary key, title text, genres text); ## table 확인 > desc tables; Data 로드 > copy movies(movie_id, title, genres) from 'C:\..