6.7 Restriction on Key Types

Learn about the vertex and edge keys restrictions when loading a full or partial SQL property graph into memory in the graph server (PGX).

The following applies when loading an entire SQL property graph into memory:

  • It is mandatory that the vertex keys are both accessible and of a supported type.

    For vertices, keys need to be one these (PGX) types: INTEGER, LONG, or STRING.

  • Composite vertex keys are not supported. This implies that each vertex table can have one and only one key column.
  • Loading edge keys are optional. This means that if an edge key type is not supported, then the SQL graph can still be loaded using the readGraphByName API. In such as case, the graph server (PGX) will not load the edge key, but generate a new one instead.

    For edges, keys can only be numeric and the only supported type is LONG.

  • Composite edge keys are not supported.

However, when loading a subgraph from a SQL property graph, both the vertex and edge keys must be of a supported PGX type. If the graph has at least one edge table where keys cannot be loaded (either because keys are missing, composite keys, or unsupported types), then you cannot load a subgraph into the graph server (PGX).

In most cases, this restriction can be worked around by using generated numeric keys instead of existing keys. See Loading SQL Property Graphs with Unsupported Key Types for an example.