-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Spark Loader example schema and struct mismatch
- Loading branch information
1 parent
549ca82
commit 5e8322f
Showing
5 changed files
with
68 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
hugegraph-loader/assembly/static/example/spark/struct-hbase.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"vertices": [ | ||
{ | ||
"label": "person", | ||
"input": { | ||
"type": "file", | ||
"path": "example/spark/vertex_person.json", | ||
"format": "JSON", | ||
"header": ["name", "age", "city"], | ||
"charset": "UTF-8", | ||
"skipped_line": { | ||
"regex": "(^#|^//).*" | ||
} | ||
}, | ||
"id": "name", | ||
"null_values": ["NULL", "null", ""] | ||
}, | ||
{ | ||
"label": "software", | ||
"input": { | ||
"type": "file", | ||
"path": "example/spark/vertex_software.json", | ||
"format": "JSON", | ||
"header": ["id","name", "lang", "price","ISBN"], | ||
"charset": "GBK" | ||
}, | ||
"id": "name", | ||
"ignored": ["ISBN"] | ||
} | ||
], | ||
"edges": [ | ||
{ | ||
"label": "knows", | ||
"source": ["source_name"], | ||
"target": ["target_name"], | ||
"input": { | ||
"type": "file", | ||
"path": "example/spark/edge_knows.json", | ||
"format": "JSON", | ||
"date_format": "yyyyMMdd", | ||
"header": ["source_name","target_name", "date", "weight"] | ||
}, | ||
"field_mapping": { | ||
"source_name": "name", | ||
"target_name": "name" | ||
} | ||
} | ||
], | ||
"backendStoreInfo": { | ||
"edge_tablename": "hugegraph:g_oe", | ||
"vertex_tablename": "hugegraph:g_v", | ||
"hbase_zookeeper_quorum": "127.0.0.1", | ||
"hbase_zookeeper_property_clientPort": "2181", | ||
"zookeeper_znode_parent": "/hbase" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
hugegraph-loader/assembly/static/example/spark/vertex_person.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{"name": "marko", "age": "29", "city": "Beijing"} | ||
{"name": "vadas", "age": "27", "city": "Hongkong"} | ||
{"name": "josh", "age": "32", "city": "Beijing"} | ||
{"name": "peter", "age": "35", "city": "Shanghai"} | ||
{"name": "li,nary", "age": "26", "city": "Wu,han"} | ||
{"name": "tom", "age": "null", "city": "NULL"} | ||
{"name": "marko", "age": "29", "city": "Beijing"} | ||
{"name": "vadas", "age": "27", "city": "Hongkong"} | ||
{"name": "josh", "age": "32", "city": "Beijing"} | ||
{"name": "peter", "age": "35", "city": "Shanghai"} | ||
{"name": "li,nary", "age": "26", "city": "Wu,han"} | ||
{"name": "tom", "age": "null", "city": "NULL"} |
4 changes: 2 additions & 2 deletions
4
hugegraph-loader/assembly/static/example/spark/vertex_software.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{ "name": "lop", "lang": "java","price": "328","ISBN": "ISBN978-7-107-18618-5"} | ||
{ "name": "ripple", "lang": "java","price": "199","ISBN": "ISBN978-7-100-13678-5"} | ||
{"name": "lop", "lang": "java", "price": "328", "ISBN": "ISBN978-7-107-18618-5"} | ||
{"name": "ripple", "lang": "java", "price": "199", "ISBN": "ISBN978-7-100-13678-5"} |