-
Notifications
You must be signed in to change notification settings - Fork 6
/
nebula-importer.yaml
140 lines (134 loc) · 2.99 KB
/
nebula-importer.yaml
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
128
129
130
131
132
133
134
135
136
137
138
139
140
version: v2
description: nebula-importer config file from https://github.com/wey-gu/movie-recommendation-dataset
removeTempFiles: false
clientSettings:
retry: 3
concurrency: 2
channelBufferSize: 1
space: moviegraph
connection:
user: root
password: nebula
address: graphd1:9669,graphd2:9669
postStart:
commands: |
CREATE SPACE IF NOT EXISTS moviegraph(partition_num=10,replica_factor=1,vid_type=fixed_string(32));
USE moviegraph;
CREATE TAG IF NOT EXISTS person(name string, birthdate string);
CREATE TAG IF NOT EXISTS movie(name string);
CREATE TAG IF NOT EXISTS genre(name string);
CREATE TAG IF NOT EXISTS user(user_id string);
CREATE EDGE IF NOT EXISTS acted_by();
CREATE EDGE IF NOT EXISTS directed_by();
CREATE EDGE IF NOT EXISTS with_genre();
CREATE EDGE IF NOT EXISTS watched(rate float);
afterPeriod: 8s
preStop:
commands: |
SUBMIT JOB STATS;
logPath: /data/err/test.log
files:
- path: /data/movies.csv
failDataPath: /data/err/
batchSize: 128
inOrder: true
type: csv
csv:
withHeader: true
withLabel: false
schema:
type: vertex
- path: /data/people.csv
failDataPath: /data/err/
batchSize: 128
inOrder: true
type: csv
csv:
withHeader: true
withLabel: false
schema:
type: vertex
- path: /data/genres.csv
failDataPath: /data/err/
batchSize: 128
inOrder: true
type: csv
csv:
withHeader: true
withLabel: false
schema:
type: vertex
- path: /data/acted_by.csv
failDataPath: /data/err/
batchSize: 128
type: csv
csv:
withHeader: true
withLabel: false
schema:
type: edge
edge:
name: acted_by
withRanking: false
- path: /data/directed_by.csv
failDataPath: /data/err/
batchSize: 128
type: csv
csv:
withHeader: true
withLabel: false
schema:
type: edge
edge:
name: directed_by
withRanking: false
- path: /data/with_genre.csv
failDataPath: /data/err/
batchSize: 128
type: csv
csv:
withHeader: true
withLabel: false
schema:
type: edge
edge:
name: with_genre
withRanking: false
- path: /data/user_watched_movies.csv
failDataPath: /data/err/
batchSize: 128
type: csv
csv:
withHeader: false
withLabel: false
schema:
type: edge
edge:
name: watched
srcVID:
index: 0
dstVID:
index: 3
props:
- name: rate
type: double
index: 1
- path: /data/user_watched_movies.csv
failDataPath: /data/err/
batchSize: 128
inOrder: true
type: csv
csv:
withHeader: false
withLabel: false
schema:
type: vertex
vertex:
vid:
index: 0
tags:
- name: user
props:
- name: user_id
type: string
index: 0