-
Notifications
You must be signed in to change notification settings - Fork 8
/
nebula-importer.yaml
173 lines (167 loc) · 3.61 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
version: v2
description: nebula shareholding relationship data importing
removeTempFiles: false
clientSettings:
retry: 3
concurrency: 2 # number of graph clients
channelBufferSize: 1
space: shareholding
connection:
user: root
password: nebula
address: graphd1:9669,graphd2:9669
postStart:
commands: |
DROP SPACE IF EXISTS shareholding;
CREATE SPACE IF NOT EXISTS shareholding(partition_num=5, replica_factor=1, vid_type=FIXED_STRING(10));
USE shareholding;
CREATE TAG person(name string);
CREATE TAG corp(name string);
CREATE TAG INDEX person_name on person(name(20));
CREATE TAG INDEX corp_name on corp(name(20));
CREATE EDGE role_as(role string);
CREATE EDGE is_branch_of();
CREATE EDGE hold_share(share float);
CREATE EDGE reletive_with(degree int);
afterPeriod: 8s
logPath: ./err/test.log
files:
- path: ./person.csv
failDataPath: ./err/person.csv
batchSize: 32
inOrder: true
type: csv
csv:
withHeader: false
withLabel: false
schema:
type: vertex
vertex:
vid:
index: 0
tags:
- name: person
props:
- name: name
type: string
index: 1
- path: ./corp.csv
failDataPath: ./err/corp.csv
batchSize: 32
inOrder: true
type: csv
csv:
withHeader: false
withLabel: false
schema:
type: vertex
vertex:
vid:
index: 0
tags:
- name: corp
props:
- name: name
type: string
index: 1
- path: ./person_corp_role.csv
failDataPath: ./err/person_corp_role.csv
batchSize: 32
inOrder: false
type: csv
csv:
withHeader: false
withLabel: false
schema:
type: edge
edge:
name: role_as
withRanking: false
srcVID:
index: 0
dstVID:
index: 1
props:
- name: role
type: string
index: 2
- path: ./corp_rel.csv
failDataPath: ./err/corp_rel.csv
batchSize: 32
inOrder: false
type: csv
csv:
withHeader: false
withLabel: false
schema:
type: edge
edge:
name: is_branch_of
withRanking: false
srcVID:
index: 0
dstVID:
index: 1
- path: ./corp_share.csv
failDataPath: ./err/corp_share.csv
batchSize: 32
inOrder: false
type: csv
csv:
withHeader: false
withLabel: false
schema:
type: edge
edge:
name: hold_share
withRanking: false
srcVID:
index: 0
dstVID:
index: 1
props:
- name: share
type: float
index: 2
- path: ./person_corp_share.csv
failDataPath: ./err/person_corp_share.csv
batchSize: 32
inOrder: false
type: csv
csv:
withHeader: false
withLabel: false
schema:
type: edge
edge:
name: hold_share
withRanking: false
srcVID:
index: 0
dstVID:
index: 1
props:
- name: share
type: float
index: 2
- path: ./person_rel.csv
failDataPath: ./err/person_rel.csv
batchSize: 32
inOrder: false
type: csv
csv:
withHeader: false
withLabel: false
schema:
type: edge
edge:
name: reletive_with
withRanking: false
srcVID:
index: 0
dstVID:
index: 1
props:
- name: degree
type: int
index: 2