This is an automated email from the ASF dual-hosted git repository.

weibin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-graphar-testing.git


The following commit(s) were added to refs/heads/main by this push:
     new 0db087c  add import config file (#26)
0db087c is described below

commit 0db087c3c008c2ad5b4d894c68dd4c56fba20720
Author: Liu Jiajun <939282...@qq.com>
AuthorDate: Tue Oct 29 23:55:04 2024 +0800

    add import config file (#26)
---
 neo4j/data/import.full.json | 214 ++++++++++++++++++++++++++++++++++++++++++++
 neo4j/data/import.mini.json | 130 +++++++++++++++++++++++++++
 2 files changed, 344 insertions(+)

diff --git a/neo4j/data/import.full.json b/neo4j/data/import.full.json
new file mode 100644
index 0000000..479c508
--- /dev/null
+++ b/neo4j/data/import.full.json
@@ -0,0 +1,214 @@
+{
+    "graphar": {
+        "path": "/workspaces/incubator-graphar/graphar/movie",
+        "name": "MovieGraph",
+        "vertex_chunk_size": 100,
+        "edge_chunk_size": 1024,
+        "file_type": "parquet",
+        "adj_list_type": "ordered_by_source",
+        "validate_level": "weak",
+        "version": "gar/v1"
+    },
+    "import_schema": {
+        "vertices": [
+            {
+                "type": "Person",
+                "labels": [
+                    "Person"
+                ],
+                "chunk_size": 100,
+                "validate_level": "no",
+                "prefix": "vertex/Person/",
+                "property_groups": [
+                    {
+                        "file_type": "parquet",
+                        "properties": [
+                            {
+                                "name": "name",
+                                "data_type": "string",
+                                "is_primary": true,
+                                "nullable": false
+                            },
+                            {
+                                "name": "born",
+                                "data_type": "int64",
+                                "is_primary": false,
+                                "nullable": true
+                            }
+                        ]
+                    }
+                ],
+                "sources": [
+                    {
+                        "file_type": "parquet",
+                        "path": 
"/workspaces/incubator-graphar/testing/neo4j/data/Person.parquet",
+                        "columns": {
+                            "name": "name",
+                            "born": "born"
+                        }
+                    }
+                ]
+            },
+            {
+                "type": "Movie",
+                "labels": [
+                    "Movie"
+                ],
+                "chunk_size": 100,
+                "validate_level": "no",
+                "prefix": "vertex/Movie/",
+                "property_groups": [
+                    {
+                        "file_type": "parquet",
+                        "properties": [
+                            {
+                                "name": "title",
+                                "data_type": "string",
+                                "is_primary": true,
+                                "nullable": false
+                            },
+                            {
+                                "name": "tagline",
+                                "data_type": "string",
+                                "is_primary": false,
+                                "nullable": true
+                            }
+                        ]
+                    }
+                ],
+                "sources": [
+                    {
+                        "file_type": "orc",
+                        "path": 
"/workspaces/incubator-graphar/testing/neo4j/data/Movie.orc",
+                        "columns": {
+                            "title": "title",
+                            "tagline": "tagline"
+                        }
+                    }
+                ]
+            }
+        ],
+        "edges": [
+            {
+                "edge_type": "WROTE",
+                "src_type": "Person",
+                "src_prop": "name",
+                "dst_type": "Movie",
+                "dst_prop": "title",
+                "chunk_size": 1024,
+                "validate_level": "no",
+                "prefix": "edge/Person_WROTE_Movie/",
+                "adj_lists": [
+                    {
+                        "ordered": true,
+                        "aligned_by": "src",
+                        "file_type": "parquet"
+                    },
+                    {
+                        "ordered": true,
+                        "aligned_by": "dst",
+                        "file_type": "parquet"
+                    }
+                ],
+                "sources": [
+                    {
+                        "file_type": "csv",
+                        "delimiter": ",",
+                        "path": 
"/workspaces/incubator-graphar/testing/neo4j/data/Person_WROTE_Movie.csv",
+                        "columns": {
+                            "name": "name",
+                            "title": "title"
+                        }
+                    }
+                ]
+            },
+            {
+                "edge_type": "ACTED_IN",
+                "src_type": "Person",
+                "src_prop": "name",
+                "dst_type": "Movie",
+                "dst_prop": "title",
+                "validate_level": "no",
+                "chunk_size": 1024,
+                "prefix": "edge/Person_ACTED_IN_Movie/",
+                "adj_lists": [
+                    {
+                        "ordered": true,
+                        "aligned_by": "src",
+                        "file_type": "parquet"
+                    },
+                    {
+                        "ordered": true,
+                        "aligned_by": "dst",
+                        "file_type": "parquet"
+                    }
+                ],
+                "sources": [
+                    {
+                        "file_type": "json",
+                        "delimiter": ",",
+                        "path": 
"/workspaces/incubator-graphar/testing/neo4j/data/Person_ACTED_IN_Movie.json",
+                        "columns": {
+                            "name": "name",
+                            "title": "title"
+                        }
+                    }
+                ]
+            },
+            {
+                "edge_type": "REVIEWED",
+                "src_type": "Person",
+                "src_prop": "name",
+                "dst_type": "Movie",
+                "dst_prop": "title",
+                "chunk_size": 1024,
+                "validate_level": "no",
+                "prefix": "edge/Person_REVIEWED_Movie/",
+                "property_groups": [
+                    {
+                        "file_type": "parquet",
+                        "properties": [
+                            {
+                                "name": "rating",
+                                "data_type": "int64",
+                                "is_primary": false,
+                                "nullable": true
+                            },
+                            {
+                                "name": "summary",
+                                "data_type": "string",
+                                "is_primary": false,
+                                "nullable": true
+                            }
+                        ]
+                    }
+                ],
+                "adj_lists": [
+                    {
+                        "ordered": true,
+                        "aligned_by": "src",
+                        "file_type": "parquet"
+                    },
+                    {
+                        "ordered": true,
+                        "aligned_by": "dst",
+                        "file_type": "parquet"
+                    }
+                ],
+                "sources": [
+                    {
+                        "file_type": "csv",
+                        "delimiter": ",",
+                        "path": 
"/workspaces/incubator-graphar/testing/neo4j/data/Person_REVIEWED_Movie.csv",
+                        "columns": {
+                            "name": "name",
+                            "title": "title",
+                            "summary": "summary",
+                            "rating": "rating"
+                        }
+                    }
+                ]
+            }
+        ]
+    }
+}
\ No newline at end of file
diff --git a/neo4j/data/import.mini.json b/neo4j/data/import.mini.json
new file mode 100644
index 0000000..8d85c77
--- /dev/null
+++ b/neo4j/data/import.mini.json
@@ -0,0 +1,130 @@
+{
+    "graphar": {
+        "path": "/workspaces/incubator-graphar/graphar/movie",
+        "name": "MovieGraph"
+    },
+    "import_schema": {
+        "vertices": [
+            {
+                "type": "Person",
+                "property_groups": [
+                    {
+                        "properties": [
+                            {
+                                "name": "name",
+                                "data_type": "string",
+                                "is_primary": true
+                            },
+                            {
+                                "name": "born",
+                                "data_type": "int64"
+                            }
+                        ]
+                    }
+                ],
+                "sources": [
+                    {
+                        "path": 
"/workspaces/incubator-graphar/testing/neo4j/data/Person.parquet",
+                        "columns": {
+                            "name": "name",
+                            "born": "born"
+                        }
+                    }
+                ]
+            },
+            {
+                "type": "Movie",
+                "property_groups": [
+                    {
+                        "properties": [
+                            {
+                                "name": "title",
+                                "data_type": "string",
+                                "is_primary": true
+                            },
+                            {
+                                "name": "tagline",
+                                "data_type": "string"
+                            }
+                        ]
+                    }
+                ],
+                "sources": [
+                    {
+                        "path": 
"/workspaces/incubator-graphar/testing/neo4j/data/Movie.orc",
+                        "columns": {
+                            "title": "title",
+                            "tagline": "tagline"
+                        }
+                    }
+                ]
+            }
+        ],
+        "edges": [
+            {
+                "edge_type": "WROTE",
+                "src_type": "Person",
+                "src_prop": "name",
+                "dst_type": "Movie",
+                "dst_prop": "title",
+                "sources": [
+                    {
+                        "path": 
"/workspaces/incubator-graphar/testing/neo4j/data/Person_WROTE_Movie.csv",
+                        "columns": {
+                            "name": "name",
+                            "title": "title"
+                        }
+                    }
+                ]
+            },
+            {
+                "edge_type": "ACTED_IN",
+                "src_type": "Person",
+                "src_prop": "name",
+                "dst_type": "Movie",
+                "dst_prop": "title",
+                "sources": [
+                    {
+                        "path": 
"/workspaces/incubator-graphar/testing/neo4j/data/Person_ACTED_IN_Movie.csv",
+                        "columns": {
+                            "name": "name",
+                            "title": "title"
+                        }
+                    }
+                ]
+            },
+            {
+                "edge_type": "REVIEWED",
+                "src_type": "Person",
+                "src_prop": "name",
+                "dst_type": "Movie",
+                "dst_prop": "title",
+                "property_groups": [
+                    {
+                        "properties": [
+                            {
+                                "name": "rating",
+                                "data_type": "int64"
+                            },
+                            {
+                                "name": "summary",
+                                "data_type": "string"
+                            }
+                        ]
+                    }
+                ],
+                "sources": [
+                    {
+                        "path": 
"/workspaces/incubator-graphar/testing/neo4j/data/Person_REVIEWED_Movie.csv",
+                        "columns": {
+                            "name": "name",
+                            "title": "title",
+                            "summary": "summary",
+                            "rating": "rating"
+                        }
+                    }
+                ]
+            }
+        ]
+    }
+}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@graphar.apache.org
For additional commands, e-mail: commits-h...@graphar.apache.org

Reply via email to