-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathload_dynamic_1.gsql
127 lines (95 loc) · 4.14 KB
/
load_dynamic_1.gsql
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
CREATE LOADING JOB load_dynamic_1 {
DEFINE FILENAME comment;
DEFINE FILENAME post;
DEFINE FILENAME forum;
DEFINE FILENAME person;
DEFINE FILENAME forum_containerOf_post;
DEFINE FILENAME post_isLocatedIn_place;
DEFINE FILENAME person_isLocatedIn_place;
DEFINE FILENAME post_hasCreator_person;
DEFINE FILENAME comment_hasCreator_person;
DEFINE FILENAME person_knows_person;
DEFINE FILENAME post_hasTag_tag;
DEFINE FILENAME comment_hasTag_tag;
DEFINE FILENAME comment_isLocatedIn_place;
DEFINE FILENAME comment_replyOf_comment;
DEFINE FILENAME comment_replyOf_post;
DEFINE FILENAME forum_hasMember_person;
DEFINE FILENAME forum_hasModerator_person;
DEFINE FILENAME forum_hasTag_tag;
DEFINE FILENAME person_hasInterest_tag;
DEFINE FILENAME person_likes_comment;
DEFINE FILENAME person_likes_post;
DEFINE FILENAME person_studyAt_organisation;
DEFINE FILENAME person_workAt_organisation;
LOAD comment
TO VERTEX Comment VALUES($0, $1, $2, $3, $4, $5, _)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD post
TO VERTEX Post VALUES ($0, $1, $2, $3, $4, $5, $6, $7, _)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD forum
TO VERTEX Forum VALUES ($0, $1, $2)
USING SEPARATOR="|", HEADER="true", EOL="\n";
// some serializers store languages in emails in a separate files. in that case there is no token 8 and 9
LOAD person
TO VERTEX Person VALUES ($0, $1, $2, $3, $4, $5, $6, $7, SPLIT($8,";"), SPLIT($9,";"))
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD forum_containerOf_post
TO EDGE CONTAINER_OF VALUES ($0, $1)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD post_isLocatedIn_place
TO VERTEX Post VALUES ($0, _, _, _, _, _, _, _, $1)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD comment_isLocatedIn_place
TO VERTEX Comment VALUES ($0, _, _, _, _, _, $1)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD person_isLocatedIn_place
TO EDGE IS_LOCATED_IN VALUES ($0 Person, $1 City)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD post_hasCreator_person
TO EDGE HAS_CREATOR VALUES ($0 Post, $1 Person)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD person_knows_person
TO EDGE KNOWS VALUES ($0 Person, $1 Person, $2)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD comment_hasCreator_person
TO EDGE HAS_CREATOR VALUES ($0 Comment, $1 Person)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD person_hasInterest_tag
TO EDGE HAS_INTEREST VALUES ($0 Person, $1 Tag)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD person_likes_comment
TO EDGE LIKES VALUES ($0 Person, $1 Comment, $2)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD person_studyAt_organisation
TO EDGE STUDY_AT VALUES ($0 Person, $1 University, $2)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD person_workAt_organisation
TO EDGE WORK_AT VALUES ($0 Person, $1 Company, $2)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD forum_hasMember_person
TO EDGE HAS_MEMBER VALUES ($0 Forum, $1 Person, $2)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD forum_hasModerator_person
TO EDGE HAS_MODERATOR VALUES ($0, $1)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD comment_hasTag_tag
TO EDGE HAS_TAG VALUES ($0 Comment, $1 Tag)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD post_hasTag_tag
TO EDGE HAS_TAG VALUES ($0 Post, $1 Tag)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD forum_hasTag_tag
TO EDGE HAS_TAG VALUES ($0 Forum, $1 Tag)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD person_likes_post
TO EDGE LIKES VALUES ($0 Person, $1 Post, $2)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD comment_replyOf_comment
TO EDGE REPLY_OF VALUES ($0 Comment, $1 Comment)
USING SEPARATOR="|", HEADER="true", EOL="\n";
LOAD comment_replyOf_post
TO EDGE REPLY_OF VALUES ($0 Comment,$1 Post)
USING SEPARATOR="|", HEADER="true", EOL="\n";
}