duckpgq
Erweiterung, die Unterstützung für SQL/PGQ und Graphalgorithmen hinzufügt
Maintainer: Dtenwolde
Installation und Laden
INSTALL duckpgq FROM community;LOAD duckpgq;Beispiel
CREATE TABLE Person AS SELECT * FROM 'https://gist.githubusercontent.com/Dtenwolde/2b02aebbed3c9638a06fda8ee0088a36/raw/8c4dc551f7344b12eaff2d1438c9da08649d00ec/person-sf0.003.csv';CREATE TABLE Person_knows_person AS SELECT * FROM 'https://gist.githubusercontent.com/Dtenwolde/81c32c9002d4059c2c3073dbca155275/raw/8b440e810a48dcaa08c07086e493ec0e2ec6b3cb/person_knows_person-sf0.003.csv';
CREATE PROPERTY GRAPH snb VERTEX TABLES ( Person ) EDGE TABLES ( Person_knows_person SOURCE KEY (Person1Id) REFERENCES Person (id) DESTINATION KEY (Person2Id) REFERENCES Person (id) LABEL knows );
FROM GRAPH_TABLE (snb MATCH (a:Person)-[k:knows]->(b:Person) COLUMNS (a.id, b.id))LIMIT 1;
FROM GRAPH_TABLE (snb MATCH p = ANY SHORTEST (a:person)-[k:knows]->{1,3}(b:Person) COLUMNS (a.id, b.id, path_length(p)))LIMIT 1;
FROM local_clustering_coefficient(snb, person, knows);
DROP PROPERTY GRAPH snb;Über duckpgq
Die DuckPGQ-Erweiterung unterstützt die SQL/PGQ-Syntax als Teil des offiziellen, von ISO entwickelten SQL:2023-Standards.
Sie führt visuelles Graph-Pattern-Matching und eine kompaktere Syntax für die Pfadsuche ein. Weitere Informationen finden Sie in der DuckPGQ-Dokumentation.
Hinweis: Da diese Erweiterung Teil eines laufenden Forschungsprojekts der Gruppe Database Architectures am CWI ist, können einige Funktionen noch in der Entwicklung sein. Wir danken für Ihr Verständnis und Ihre Geduld, während wir sie weiter verbessern.
Hinzugefügte Funktionen
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| cheapest_path_length | scalar | NULL | NULL | |
| create_csr_edge | scalar | NULL | NULL | |
| create_csr_vertex | scalar | NULL | NULL | |
| create_property_graph | table | NULL | NULL | |
| create_vertex_table | pragma | NULL | NULL | |
| csr_get_w_type | scalar | NULL | NULL | |
| delete_csr | scalar | NULL | NULL | |
| describe_property_graph | table | NULL | NULL | |
| drop_property_graph | table | NULL | NULL | |
| duckpgq_match | table | NULL | NULL | |
| get_csr_e | table | NULL | NULL | |
| get_csr_ptr | table | NULL | NULL | |
| get_csr_v | table | NULL | NULL | |
| get_csr_w | table | NULL | NULL | |
| get_pg_ecolnames | table | NULL | NULL | |
| get_pg_etablenames | table | NULL | NULL | |
| get_pg_vcolnames | table | NULL | NULL | |
| get_pg_vtablenames | table | NULL | NULL | |
| iterativelength | scalar | NULL | NULL | |
| iterativelength2 | scalar | NULL | NULL | |
| iterativelengthbidirectional | scalar | NULL | NULL | |
| local_clustering_coefficient | scalar | NULL | NULL | |
| local_clustering_coefficient | table | NULL | NULL | |
| pagerank | scalar | NULL | NULL | |
| pagerank | table | NULL | NULL | |
| reachability | scalar | NULL | NULL | |
| shortestpath | scalar | NULL | NULL | |
| show_property_graphs | pragma | NULL | NULL | |
| summarize_property_graph | table | NULL | NULL | |
| weakly_connected_component | scalar | NULL | NULL | |
| weakly_connected_component | table | NULL | NULL |
Überladene Funktionen
Diese Erweiterung fügt keine Funktionsüberladungen hinzu.
Hinzugefügte Typen
Diese Erweiterung fügt keine Typen hinzu.
Hinzugefügte Einstellungen
Diese Erweiterung fügt keine Einstellungen hinzu.