-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCassandraDatabaseScript.cql
More file actions
67 lines (58 loc) · 1.53 KB
/
CassandraDatabaseScript.cql
File metadata and controls
67 lines (58 loc) · 1.53 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
DROP KEYSPACE IF EXISTS dfanalyzer;
CREATE KEYSPACE dfanalyzer WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 3 };
CREATE TABLE dfanalyzer."Execution" (
id uuid,
"ApplicationName" text,
"EndTime" timestamp,
"StartTime" timestamp,
PRIMARY KEY (id)
);
CREATE TABLE dfanalyzer."TransformationGroup" (
"executionID" uuid,
id uuid,
"initTasksIDS" SET<uuid>,
"intermediaryTasksIDS" SET<uuid>,
"finishTaskID" uuid,
PRIMARY KEY (("executionID"), id)
);
CREATE TABLE dfanalyzer."Task" (
"executionID" uuid,
id uuid,
description text,
"transformationType" text,
"usingDefaultSchema" boolean,
"schemaFields" LIST<text>,
"hasDataInRepository" boolean,
PRIMARY KEY (("executionID"), id)
);
CREATE TABLE dfanalyzer."DataElement" (
"executionID" uuid,
id uuid,
values LIST<frozen<LIST<text>>>,
PRIMARY KEY (("executionID"), id)
);
CREATE TABLE dfanalyzer."FileGroupReference" (
"executionID" uuid,
id uuid,// DataElement ID
"folderPath" text,
PRIMARY KEY (("executionID"), id)
);
CREATE TABLE dfanalyzer."DependenciesOfTask" (
"executionID" uuid,
target uuid,
source SET<uuid>,
PRIMARY KEY (("executionID"), target)
);
CREATE TABLE dfanalyzer."DependenciesOfDataElement" (
"executionID" uuid,
task uuid,
source SET<uuid>,
target uuid,
PRIMARY KEY (("executionID"), task, target)
);
TRUNCATE dfanalyzer."DataElement";
TRUNCATE dfanalyzer."DependenciesOfDataElement";
TRUNCATE dfanalyzer."Execution";
TRUNCATE dfanalyzer."Task";
TRUNCATE dfanalyzer."DependenciesOfTask";
TRUNCATE dfanalyzer."TransformationGroup";