adsharma commented on issue #679: URL: https://github.com/apache/incubator-graphar/issues/679#issuecomment-3691733294
https://gist.github.com/adsharma/64e984099815a01d3bf5073733f46eee is proof of concept script `graph_ar_to_std.py`. It was tested as follows: ``` incubator-graphar-testing git:(main) $ uv run python graph_ar_to_std.py --graphar-dir nebula --output-db output.duckdb --csr-table basketball --directed lbug -i output/schema.cypher lbug> :schema CREATE NODE TABLE `player` (`_vertexId` STRING,`name` STRING,`age` STRING, PRIMARY KEY(`_vertexId`)); CREATE NODE TABLE `team` (`_vertexId` STRING,`name` STRING, PRIMARY KEY(`_vertexId`)); CREATE REL TABLE `serve` (FROM `player` TO `team`, MANY_MANY); CREATE REL TABLE `follow` (FROM `player` TO `player`, MANY_MANY); lbug> match (a:player)-[b:serve]->(c:team) return a.*, b.*, c.*; lbug> match (a:player)-[b:follow]->(c:player) return a.*, b.*, c.*; ``` A further optimization: when the sorting order is the same between graph ar and std and the graphs are large, we can perhaps avoid a file copy and have new metadata point to existing files. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
