-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.cql
24 lines (21 loc) · 1.11 KB
/
schema.cql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
drop keyspace if exists location;
create keyspace location with replication = {'class':'SimpleStrategy','replication_factor' : 3};
use location;
create table drivers (
id int,
firstname text,
long float,
xlat float,
zone int,
primary key(zone, id)
);
copy drivers (id,firstname,long,xlat,zone) from 'tenMillion/0.txt' with delimiter=',';
copy drivers (id,firstname,long,xlat,zone) from 'tenMillion/1.txt' with delimiter=',';
copy drivers (id,firstname,long,xlat,zone) from 'tenMillion/2.txt' with delimiter=',';
copy drivers (id,firstname,long,xlat,zone) from 'tenMillion/3.txt' with delimiter=',';
copy drivers (id,firstname,long,xlat,zone) from 'tenMillion/4.txt' with delimiter=',';
copy drivers (id,firstname,long,xlat,zone) from 'tenMillion/5.txt' with delimiter=',';
copy drivers (id,firstname,long,xlat,zone) from 'tenMillion/6.txt' with delimiter=',';
copy drivers (id,firstname,long,xlat,zone) from 'tenMillion/7.txt' with delimiter=',';
copy drivers (id,firstname,long,xlat,zone) from 'tenMillion/8.txt' with delimiter=',';
copy drivers (id,firstname,long,xlat,zone) from 'tenMillion/9.txt' with delimiter=',';