-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsongs-by-albums.yml
53 lines (49 loc) · 1.21 KB
/
songs-by-albums.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
# Keyspace
#
keyspace: songbrowser
keyspace_definition: |
CREATE KEYSPACE IF NOT EXISTS songbrowser WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'};
#
# Table name and create CQL
#
table: songs_by_albums
table_definition: |
CREATE TABLE IF NOT EXISTS songs_by_albums (
album_title VARCHAR,
artist VARCHAR,
genre VARCHAR,
performers LIST<VARCHAR>,
release_year INT,
song_title VARCHAR,
track_no INT,
PRIMARY KEY ((release_year, album_title), track_no)
);
#
# Meta information for generating data
# name: column name
# size: length
# population: type of population, eg:
# uniform(1..n) - n different values, equally probable
# gaussian(1..n) - n different values, bell curve probability
#
columnspec:
- name: release_year
population: uniform(1950..2010)
- name: album_title
size: fixed(32)
population: uniform(1..50)
- name: track_no
population: gaussian(6..16)
#
# INSERT queries
#
insert:
batchtype: UNLOGGED # use unlogged batches
#
# SELECT queries
#
queries:
by-album:
cql: SELECT * FROM songs_by_artists WHERE AND release_year = ? AND album_title = ?
fields: multirow