6.8 Loading SQL Property Graphs with Unsupported Key Types
If existing keys in a SQL graph cannot be loaded into the graph server (PGX), then generated keys maintained by the database may be used instead.
Consider the following SQL property graph which is defined with
composite edge keys (
USER1
, USER2
) for its edge table
FRIENDS_WITH
:CREATE PROPERTY GRAPH SOCIAL_NETWORK
VERTEX TABLES (
ACCOUNT
KEY (ID) LABEL USER PROPERTIES (FULL_NAME, USERNAME)
)
EDGE TABLES (
FRIENDS_WITH
KEY (USER1, USER2)
SOURCE KEY (USER1) REFERENCES ACCOUNT (USERNAME)
DESTINATION KEY (USER2) REFERENCES ACCOUNT (USERNAME)
NO PROPERTIES
)
OPTIONS (TRUSTED MODE);
Although the SOCIAL_NETWORK
graph can be loaded into
the graph server (PGX), the edge keys will not be loaded. Also, subgraph loading is
not supported for composite edge keys.
In order to resolve these issues, you can perform the following workaround
steps on the underlying
FRIENDS_WITH
edge table.
Parent topic: Loading a SQL Property Graph into the Graph Server (PGX)