ALTER GRAPH Syntax
Parameters
<schema name>
<schema name>
Name of the schema containing the graph to alter
<graph name>
<graph name>
Name of the graph to alter
EDGES
EDGES
Graph component, provided as column names, expressions, or constants using the SQL
INPUT_TABLE or
INPUT_TABLES function, to use for identifying the edges of the graph; review Components and Identifiers and
Identifier Combinations for more informationThe input can be either the name of a table with appropriately named columns; or a query, to use
specific columns or other SQL features).
NODES
NODES
Graph component, provided as column names, expressions, or constants using the SQL
INPUT_TABLE or
INPUT_TABLES function, to use for identifying the nodes of the graph; review Components and Identifiers and
Identifier Combinations for more informationThe input can be either the name of a table with appropriately named columns; or a query, to use
specific columns or other SQL features).
WEIGHTS
WEIGHTS
Graph component, provided as column names, expressions, or constants using the SQL
INPUT_TABLE or
INPUT_TABLES function, to use for identifying the weights of the graph; review Components and Identifiers and
Identifier Combinations for more informationThe input can be either the name of a table with appropriately named columns; or a query, to use
specific columns or other SQL features).
RESTRICTIONS
RESTRICTIONS
Graph component, provided as column names, expressions, or constants using the SQL
INPUT_TABLE or
INPUT_TABLES function, to use for identifying the restrictions of the graph; review
Components and Identifiers and Identifier Combinations for more informationThe input can be either the name of a table with appropriately named columns; or a query, to use
specific columns or other SQL features).
OPTIONS
OPTIONS
Indicator that a list of connection option/value assignments will follow, passed as a comma-delimited
list of key/value pairs to the
KV_PAIRS function| Option | Description |
|---|---|
add_table_monitor | Adds a table monitor to every table used in the creation of the graph; this table monitor will trigger the graph to update dynamically upon inserts to the source table(s). Note that upon database restart, if save_persist is also set to true, the graph will be fully reconstructed and the table monitors will be reattached. For more details on table monitors, see Table Monitors. The default value is false. |
add_turns | Adds dummy “pillowed” edges around intersection nodes where there are more than three edges so that additional weight penalties can be imposed by the solve endpoints (increases the total number of edges). The default value is false. |
allow_multiple_edges | Enables multigraph capability—pairs of nodes can be connected by more than one edge. Without this option, undirected graphs can only have one edge between each pair of nodes, and directed graphs can have one edge in each direction between each pair of nodes—“duplicate” edges are discarded. The default value is true. |
cluster_graph_schema | If export_graph_schema is true, groups nodes based on the Louvain clustering algorithm, converting the graph into a label-based schema. |
export_graph_schema | Exports a graph’s schema in Graphviz DOT format; this is made available in two ways:
|
graph_table | The graph is created as a table with the given name, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. The table will have the following identifier columns: EDGE_ID, EDGE_NODE1_ID, EDGE_NODE2_ID. |
label_delimiter | If specified, the delimiter to use when parsing edge labels. All labels separated by this delimiter will be applied to the corresponding edge. |
save_persist | If set to true, the graph will be saved in the persist directory (see the config reference for more information). If set to false, the graph will be removed when the graph server is shutdown. The default value is false. |
schema_edge_labelkeys | If export_graph_schema is true, generates the label-based schema by collapsing edges based on the their label keys; otherwise, schema edges are created from the edge labels. |
schema_node_labelkeys | If export_graph_schema is true, generates the label-based schema by collapsing nodes based on the their label keys; otherwise, schema nodes are created from the node labels. |
simplify | Simplifies the graph topology at 2-valence by collapsing edge. |
use_rtree | Use a range tree structure to accelerate and improve the accuracy of snapping, especially to edges. |
Examples
To alter the weights of a graph and allow it to survive a database restart:ALTER GRAPH Example