How to Create a Data Graph using Visual Builder Private Beta

Create a data graph by connecting a warehouse, defining entity and event models, and configuring relationships between them.
Available Plans
  • growth
  • enterprise

To create a data graph as YAML using Rudder CLI, see the Data Graph YAML reference.

Video walkthrough

Prerequisites

You need a connected warehouse account before you can build a data graph.

The steps to configure a warehouse connection are as follows:

1: Connect the warehouse account

  1. Navigate to Activate > Data Graph in the RudderStack dashboard.
  2. In the Connect warehouse section, select the warehouse connection from the list of available connections. If there is no warehouse connection available, click Add account to create a new connection.
Connect warehouse account
info

Note that:

  • To create a data graph, your RudderStack workspace must have at least one warehouse connection configured.

  • You can only connect one warehouse account to a data graph.

  • RudderStack supports the following warehouses currently:

  1. Connect the warehouse account to the data graph. You can now start defining entities and events.

2: Create an entity model

  1. In the Add component section, select Entity model.
Add entity model
  1. Choose the Database, Schema, and Table for the entity model.
  2. Select the Primary key.
  3. To set the entity model as a root model, select Yes.
Configure entity model
  1. Provide a name and description for the entity model and save it.

You can now continue by adding more models to the data graph.

3: Create an event model

  1. In the top right corner, click Add component and select Event.
Create event model
  1. Select the Database and Schema for the event model.
info
If you configured a root model in the previous step, the Database and Schema fields are pre-populated.
  1. In the Table field, select a table that contains timestamp information.
  2. Select the timestamp column — this defines the time dimension of the event model.
Configure event model
  1. Provide a name and description for the event model and save it.

You now have two models on the canvas of your data graph — an entity model and an event model.

4: Create relationships between models

There are two ways to create relationships between models:

By clicking on the model

  1. Click on the model from which you want to start the relationship.
Create relationship between entity and event model
  1. Click Add relationship under Relationships.
Create relationship between entity and event model
  1. In the relationship configuration view, select one of the existing models — you can also create a new model.
Create relationship between entity and event model
  1. Provide a name for the relationship.
  2. Define the cardinality of the relationship. For example, as one customer can have many purchases, the cardinality should be 1:many.
  3. Define the Join keys used to define the join condition and relate the two tables.
Create relationship between entity and event model

Using the drag-and-drop method

info
The drag and drop method is an alternate way of creating relationships between models. In this method, you visually connect one model with another on the canvas — a configuration pane opens where you can define the relationship details.

Suppose you have another entity model, Accounts, and you want to create a relationship between the entity model Customers (created previously) and this model.

Drag-and-drop relationship between entity and event model
  1. Click the + sign that appears on the right side of the Customers model.
  2. Drag the relationship line to the left of the Accounts model and drop it on the canvas.
  3. In the configuration pane, define the relationship details and the cardinality, for example, many:1, indicating that an account can have many customers.
Create drag-and-drop relationship between entity and event model
  1. Define the Join keys used to join the models, for example, Account Key.
  2. Click Create to save the relationship.
  3. Use the Auto Layout functionality (described in Step 4) to reorganize the graph.
Organized layout of the data graph

You can continue expanding the data graph with more entity and event models and relationships.

Organize the layout

Once the data graph is created, the models may appear scattered on the canvas. Use the Auto Layout option on the bottom left of the canvas to organize the graph.

Sample data graph for an ecommerce store

See also


Questions? We're here to help.

Join the RudderStack Slack community or email us for support