> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# createGraph

<div className="kinetica-doxygen">
  <div id="a4055b3b0cd047d5c78f8ab61350e1c4e" />

  <h2 className="memtitle"><span className="permalink"><a href="#a4055b3b0cd047d5c78f8ab61350e1c4e">◆ </a></span>createGraph() <span className="overload">\[1/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">CreateGraphResponse</a> gpudb::GPUdb::createGraph </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphRequest">CreateGraphRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
          <td>)</td>
          <td> const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Creates a new graph network using given nodes, edges, weights, and restrictions. </p>
      <p>IMPORTANT: It's highly recommended that you review the <a href="/content/graph_solver/network_graph_solver/" target="_top">Graphs and Solvers</a> concepts documentation, the <a href="/content/guides/graph_rest_guide/" target="_top">Graph REST Tutorial</a>, and/or some <a href="/content/guides/tags/graph" target="_top">graph examples</a> before using this endpoint.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphRequest">Request</a> object containing the parameters for the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a01658fbf50eee78b0680adaa40c91da1" />

  <h2 className="memtitle"><span className="permalink"><a href="#a01658fbf50eee78b0680adaa40c91da1">◆ </a></span>createGraph() <span className="overload">\[2/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">CreateGraphResponse</a> & gpudb::GPUdb::createGraph </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphRequest">CreateGraphRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">CreateGraphResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Creates a new graph network using given nodes, edges, weights, and restrictions. </p>
      <p>IMPORTANT: It's highly recommended that you review the <a href="/content/graph_solver/network_graph_solver/" target="_top">Graphs and Solvers</a> concepts documentation, the <a href="/content/guides/graph_rest_guide/" target="_top">Graph REST Tutorial</a>, and/or some <a href="/content/guides/tags/graph" target="_top">graph examples</a> before using this endpoint.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphRequest">Request</a> object containing the parameters for the operation. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="a025f78582e1d24c590888a3d29e19f36" />

  <h2 className="memtitle"><span className="permalink"><a href="#a025f78582e1d24c590888a3d29e19f36">◆ </a></span>createGraph() <span className="overload">\[3/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">CreateGraphResponse</a> gpudb::GPUdb::createGraph </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">graphName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const bool</td>
          <td className="paramname"><span className="paramname"><span className="em">directedGraph</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">nodes</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">edges</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">weights</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">restrictions</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Creates a new graph network using given nodes, edges, weights, and restrictions. </p>
      <p>IMPORTANT: It's highly recommended that you review the <a href="/content/graph_solver/network_graph_solver/" target="_top">Graphs and Solvers</a> concepts documentation, the <a href="/content/guides/graph_rest_guide/" target="_top">Graph REST Tutorial</a>, and/or some <a href="/content/guides/tags/graph" target="_top">graph examples</a> before using this endpoint.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">graphName</td>
              <td>Name of the graph resource to generate. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">directedGraph</td>

              <td>
                If set to <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">true</a>, the graph will be directed. If set to <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">false</a>, the graph will not be directed. Consult <a href="/content/graph_solver/network_graph_solver/#directed-graphs" target="_top">Directed Graphs</a> for more details. Supported values:

                <ul>
                  <li> true </li>
                  <li> false </li>
                </ul>

                The default value is true.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">nodes</td>
              <td>Nodes represent fundamental topological units of a graph. Nodes must be specified using <a href="/content/graph_solver/network_graph_solver/#identifiers" target="_top">identifiers</a>; identifiers are grouped as <a href="/content/graph_solver/network_graph_solver/#id-combos" target="_top">combinations</a>. Identifiers can be used with existing column names, e.g., 'table.column AS NODE\_ID', expressions, e.g., 'ST\_MAKEPOINT(column1, column2) AS NODE\_WKTPOINT', or constant values, e.g., '{"{"}9, 10, 11{"}"} AS NODE\_ID'. If using constant values in an identifier combination, the number of values specified must match across the combination. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">edges</td>
              <td>Edges represent the required fundamental topological unit of a graph that typically connect nodes. Edges must be specified using <a href="/content/graph_solver/network_graph_solver/#identifiers" target="_top">identifiers</a>; identifiers are grouped as <a href="/content/graph_solver/network_graph_solver/#id-combos" target="_top">combinations</a>. Identifiers can be used with existing column names, e.g., 'table.column AS EDGE\_ID', expressions, e.g., 'SUBSTR(column, 1, 6) AS EDGE\_NODE1\_NAME', or constant values, e.g., "{"{"}'family', 'coworker'{"}"} AS EDGE\_LABEL". If using constant values in an identifier combination, the number of values specified must match across the combination. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">weights</td>
              <td>Weights represent a method of informing the graph solver of the cost of including a given edge in a solution. Weights must be specified using <a href="/content/graph_solver/network_graph_solver/#identifiers" target="_top">identifiers</a>; identifiers are grouped as <a href="/content/graph_solver/network_graph_solver/#id-combos" target="_top">combinations</a>. Identifiers can be used with existing column names, e.g., 'table.column AS WEIGHTS\_EDGE\_ID', expressions, e.g., 'ST\_LENGTH(wkt) AS WEIGHTS\_VALUESPECIFIED', or constant values, e.g., '{"{"}4, 15{"}"} AS WEIGHTS\_VALUESPECIFIED'. If using constant values in an identifier combination, the number of values specified must match across the combination. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">restrictions</td>
              <td>Restrictions represent a method of informing the graph solver which edges and/or nodes should be ignored for the solution. Restrictions must be specified using <a href="/content/graph_solver/network_graph_solver/#identifiers" target="_top">identifiers</a>; identifiers are grouped as <a href="/content/graph_solver/network_graph_solver/#id-combos" target="_top">combinations</a>. Identifiers can be used with existing column names, e.g., 'table.column AS RESTRICTIONS\_EDGE\_ID', expressions, e.g., 'column/2 AS RESTRICTIONS\_VALUECOMPARED', or constant values, e.g., '{"{"}0, 0, 0, 1{"}"} AS RESTRICTIONS\_ONOFFCOMPARED'. If using constant values in an identifier combination, the number of values specified must match across the combination. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a417e28ff8866570429f8316aeaa3da2a">create\_graph\_merge\_tolerance</a>: If node geospatial positions are input (e.g., WKTPOINT, X, Y), determines the minimum separation allowed between unique nodes. If nodes are within the tolerance of each other, they will be merged as a single node. The default value is '1.0E-5'. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a3e5f1b4f55b323f19b1a3dcbe72ff374">create\_graph\_recreate</a>: If set to <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">true</a> and the graph (using <span className="em arg">graphName</span>) already exists, the graph is deleted and recreated. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a11e0b27a923e0799b98d3e4fb3556f84">create\_graph\_save\_persist</a>: If set to <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">true</a>, the graph will be saved in the persist directory (see the <a href="/content/config/#config-main-persistence" target="_top">config reference</a> for more information). If set to <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">false</a>, the graph will be removed when the graph server is shutdown. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a24454d1b5129edb59f73971954affb01">create\_graph\_add\_table\_monitor</a>: 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 <a className="el" href="/content/api/cpp/namespacegpudb#a11e0b27a923e0799b98d3e4fb3556f84">save\_persist</a> is also set to <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">true</a>, the graph will be fully reconstructed and the table monitors will be reattached. For more details on table monitors, see <a className="el" href="#a562dc443f79f57ea572cb5ec0f2e8093">createTableMonitor</a>. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ae24dc42aca0219b29bed07d5d9c2f826">create\_graph\_graph\_table</a>: If specified, the created graph is also created as a table with the given name, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a> and meeting <a href="/content/concepts/tables/#table-naming-criteria" target="_top">table naming criteria</a>. The table will have the following identifier columns: 'EDGE\_ID', 'EDGE\_NODE1\_ID', 'EDGE\_NODE2\_ID'. If left blank, no table is created. The default value is ''. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a1586f986bd5f37dc3e7806070f5961e2">create\_graph\_add\_turns</a>: 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). Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a072a45120a76033064fd2888df6f1972">create\_graph\_is\_partitioned</a>: Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a0eb694cde3b39f636045687e318aed15">create\_graph\_server\_id</a>: Indicates which graph server(s) to send the request to. Default is to send to the server with the most available memory. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a564af03011ce5f92e8cf2cd7ed0f870a">create\_graph\_use\_rtree</a>: Use an range tree structure to accelerate and improve the accuracy of snapping, especially to edges. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a0b1ab95446fabf6535c40eb993f7efec">create\_graph\_label\_delimiter</a>: If provided the label string will be split according to this delimiter and each sub-string will be applied as a separate label onto the specified edge. The default value is ''. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#ae39505f96d21f75fdc2ac96ffb6de000">create\_graph\_allow\_multiple\_edges</a>: Multigraph choice; allowing multiple edges with the same node pairs if set to true, otherwise, new edges with existing same node pairs will not be inserted. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad38dcf04662a13366ed41d4b3d9b2c7a">create\_graph\_embedding\_table</a>: If table exists (should be generated by the match/graph match\_embedding solver), the vector embeddings for the newly inserted nodes will be appended into this table. The default value is ''. </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="aeab804eaaec1a946d6d4a294312d8f7b" />

  <h2 className="memtitle"><span className="permalink"><a href="#aeab804eaaec1a946d6d4a294312d8f7b">◆ </a></span>createGraph() <span className="overload">\[4/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">CreateGraphResponse</a> & gpudb::GPUdb::createGraph </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">graphName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const bool</td>
          <td className="paramname"><span className="paramname"><span className="em">directedGraph</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">nodes</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">edges</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">weights</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">restrictions</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">CreateGraphResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Creates a new graph network using given nodes, edges, weights, and restrictions. </p>
      <p>IMPORTANT: It's highly recommended that you review the <a href="/content/graph_solver/network_graph_solver/" target="_top">Graphs and Solvers</a> concepts documentation, the <a href="/content/guides/graph_rest_guide/" target="_top">Graph REST Tutorial</a>, and/or some <a href="/content/guides/tags/graph" target="_top">graph examples</a> before using this endpoint.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">graphName</td>
              <td>Name of the graph resource to generate. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">directedGraph</td>

              <td>
                If set to <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">true</a>, the graph will be directed. If set to <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">false</a>, the graph will not be directed. Consult <a href="/content/graph_solver/network_graph_solver/#directed-graphs" target="_top">Directed Graphs</a> for more details. Supported values:

                <ul>
                  <li> true </li>
                  <li> false </li>
                </ul>

                The default value is true.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">nodes</td>
              <td>Nodes represent fundamental topological units of a graph. Nodes must be specified using <a href="/content/graph_solver/network_graph_solver/#identifiers" target="_top">identifiers</a>; identifiers are grouped as <a href="/content/graph_solver/network_graph_solver/#id-combos" target="_top">combinations</a>. Identifiers can be used with existing column names, e.g., 'table.column AS NODE\_ID', expressions, e.g., 'ST\_MAKEPOINT(column1, column2) AS NODE\_WKTPOINT', or constant values, e.g., '{"{"}9, 10, 11{"}"} AS NODE\_ID'. If using constant values in an identifier combination, the number of values specified must match across the combination. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">edges</td>
              <td>Edges represent the required fundamental topological unit of a graph that typically connect nodes. Edges must be specified using <a href="/content/graph_solver/network_graph_solver/#identifiers" target="_top">identifiers</a>; identifiers are grouped as <a href="/content/graph_solver/network_graph_solver/#id-combos" target="_top">combinations</a>. Identifiers can be used with existing column names, e.g., 'table.column AS EDGE\_ID', expressions, e.g., 'SUBSTR(column, 1, 6) AS EDGE\_NODE1\_NAME', or constant values, e.g., "{"{"}'family', 'coworker'{"}"} AS EDGE\_LABEL". If using constant values in an identifier combination, the number of values specified must match across the combination. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">weights</td>
              <td>Weights represent a method of informing the graph solver of the cost of including a given edge in a solution. Weights must be specified using <a href="/content/graph_solver/network_graph_solver/#identifiers" target="_top">identifiers</a>; identifiers are grouped as <a href="/content/graph_solver/network_graph_solver/#id-combos" target="_top">combinations</a>. Identifiers can be used with existing column names, e.g., 'table.column AS WEIGHTS\_EDGE\_ID', expressions, e.g., 'ST\_LENGTH(wkt) AS WEIGHTS\_VALUESPECIFIED', or constant values, e.g., '{"{"}4, 15{"}"} AS WEIGHTS\_VALUESPECIFIED'. If using constant values in an identifier combination, the number of values specified must match across the combination. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">restrictions</td>
              <td>Restrictions represent a method of informing the graph solver which edges and/or nodes should be ignored for the solution. Restrictions must be specified using <a href="/content/graph_solver/network_graph_solver/#identifiers" target="_top">identifiers</a>; identifiers are grouped as <a href="/content/graph_solver/network_graph_solver/#id-combos" target="_top">combinations</a>. Identifiers can be used with existing column names, e.g., 'table.column AS RESTRICTIONS\_EDGE\_ID', expressions, e.g., 'column/2 AS RESTRICTIONS\_VALUECOMPARED', or constant values, e.g., '{"{"}0, 0, 0, 1{"}"} AS RESTRICTIONS\_ONOFFCOMPARED'. If using constant values in an identifier combination, the number of values specified must match across the combination. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a417e28ff8866570429f8316aeaa3da2a">create\_graph\_merge\_tolerance</a>: If node geospatial positions are input (e.g., WKTPOINT, X, Y), determines the minimum separation allowed between unique nodes. If nodes are within the tolerance of each other, they will be merged as a single node. The default value is '1.0E-5'. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a3e5f1b4f55b323f19b1a3dcbe72ff374">create\_graph\_recreate</a>: If set to <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">true</a> and the graph (using <span className="em arg">graphName</span>) already exists, the graph is deleted and recreated. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a11e0b27a923e0799b98d3e4fb3556f84">create\_graph\_save\_persist</a>: If set to <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">true</a>, the graph will be saved in the persist directory (see the <a href="/content/config/#config-main-persistence" target="_top">config reference</a> for more information). If set to <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">false</a>, the graph will be removed when the graph server is shutdown. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a24454d1b5129edb59f73971954affb01">create\_graph\_add\_table\_monitor</a>: 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 <a className="el" href="/content/api/cpp/namespacegpudb#a11e0b27a923e0799b98d3e4fb3556f84">save\_persist</a> is also set to <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">true</a>, the graph will be fully reconstructed and the table monitors will be reattached. For more details on table monitors, see <a className="el" href="#a562dc443f79f57ea572cb5ec0f2e8093">createTableMonitor</a>. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ae24dc42aca0219b29bed07d5d9c2f826">create\_graph\_graph\_table</a>: If specified, the created graph is also created as a table with the given name, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a> and meeting <a href="/content/concepts/tables/#table-naming-criteria" target="_top">table naming criteria</a>. The table will have the following identifier columns: 'EDGE\_ID', 'EDGE\_NODE1\_ID', 'EDGE\_NODE2\_ID'. If left blank, no table is created. The default value is ''. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a1586f986bd5f37dc3e7806070f5961e2">create\_graph\_add\_turns</a>: 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). Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a072a45120a76033064fd2888df6f1972">create\_graph\_is\_partitioned</a>: Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a0eb694cde3b39f636045687e318aed15">create\_graph\_server\_id</a>: Indicates which graph server(s) to send the request to. Default is to send to the server with the most available memory. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a564af03011ce5f92e8cf2cd7ed0f870a">create\_graph\_use\_rtree</a>: Use an range tree structure to accelerate and improve the accuracy of snapping, especially to edges. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a0b1ab95446fabf6535c40eb993f7efec">create\_graph\_label\_delimiter</a>: If provided the label string will be split according to this delimiter and each sub-string will be applied as a separate label onto the specified edge. The default value is ''. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#ae39505f96d21f75fdc2ac96ffb6de000">create\_graph\_allow\_multiple\_edges</a>: Multigraph choice; allowing multiple edges with the same node pairs if set to true, otherwise, new edges with existing same node pairs will not be inserted. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2c423b784936dedad83dfb7dd78ef7ff">create\_graph\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a3ca8c939d8cfab26776111afb43aad58">create\_graph\_true</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad38dcf04662a13366ed41d4b3d9b2c7a">create\_graph\_embedding\_table</a>: If table exists (should be generated by the match/graph match\_embedding solver), the vector embeddings for the newly inserted nodes will be appended into this table. The default value is ''. </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1CreateGraphResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
