Create Your First Relationships
Now that you have Customer and Order nodes, connect them with PLACED relationships.
%%{init: {
"theme": "base",
"themeVariables": {
"primaryColor": "#eef6f9",
"primaryBorderColor": "#c7e0ec",
"lineColor": "#94a3b8",
"fontFamily": "Public Sans, Arial, Helvetica, sans-serif"
}
}}%%
graph LR
C(("Customer")):::primary
O(("Order")):::highlight
C -- "PLACED" --> O
classDef primary fill:#eef6f9,stroke:#c7e0ec,stroke-width:1.25px,color:#0b5c7a
classDef highlight fill:#f4f5ff,stroke:#c7d2fe,stroke-width:1.25px,color:#3730a3
linkStyle default stroke:#94a3b8,stroke-width:1.25pxCreate the PLACED relationship
In the Import tool, drag from the Customer node to the Order node:
-
Hover over the Customer node - a grey circle with a green plus sign appears
-
Click and drag to the Order node to create the relationship
Configure the relationship
In the Definition pane on the right:
-
Type:
PLACED -
Table:
orders.csv -
From node: Customer.id ←
customerIDcolumn -
To node: Order.id ←
orderIDcolumn
The customerID column in orders.csv is the foreign key that links each order to its customer.
Run the import
Click Run Import. You should see 830 PLACED relationships created.
Validate Import
Once you have imported the Customer and Order nodes and created the PLACED relationships, click the Check Database button to verify that the task is complete.
Hint
Follow the steps in this lesson to create PLACED relationships.
Make sure to:
-
Create Customer nodes from
customers.csv -
Create Order nodes from
orders.csv -
Set
idas ID property on both nodes -
Create PLACED relationships from Customer to Order
-
Match using the
customerIDcolumn in orders.csv to the Customer’sidproperty -
Click Run Import
Solution
The PLACED relationship should connect:
-
From: Customer node (using
idproperty, matched via customerID column) -
To: Order node (using
idproperty, matched via orderID column) -
Relationship type:
PLACED
After running the import, you should have:
-
91 Customer nodes
-
830 Order nodes
-
830 PLACED relationships
Download Solution
If you are having trouble, you can download the solution model and open it using the Open model (with data) option.
-
Download 2-import-customers-orders.zip
-
In the Import tool, click the 3-dot menu (…) and select Open model (with data)
-
Select the downloaded zip file
Summary
You created PLACED relationships connecting customers to their orders:
-
830 PLACED relationships created
-
Used the foreign key pattern (customerID → Customer.id)
-
Established the first half of the recommendation path: Customer→Order
Next, you’ll add Order→Product relationships to complete the path.