Kogenta Connect
Dashboards

Relationships

How to define relationships between queries to build a data model in Kogenta Connect dashboards.

Relationships let you link queries together so you can use columns from one query in widgets bound to another - without writing any joins yourself.

Why use relationships

Imagine you have three workflow queries in your dashboard:

  • stores - columns: store_id, store_name, region
  • products - columns: product_id, product_name, category
  • sales - columns: store_id, product_id, amount, date

The sales query has the transaction data, but it only contains IDs - not the store name or product name. By defining relationships:

  • Link salesstores on store_id
  • Link salesproducts on product_id

Now when you configure a widget bound to the sales query, you can also select store_name and region from stores, and product_name and category from products. The columns from related queries appear in the column picker grouped by query name.

This means you can build a table showing store_name, product_name, amount, and date - all from a single widget, without modifying any workflow.

Chaining relationships

Relationships can chain through intermediate queries. For example:

  • order_linesorders (on order_id)
  • orderscustomers (on customer_id)

A widget bound to order_lines can access columns from orders and also from customers, because there is a path through orders. This lets you build rich data models where dimension tables are linked through shared keys.

Defining a relationship

  1. Open the dashboard in the builder
  2. Click the Relationships button in the toolbar
  3. Click create to add a new relationship
  4. Select the two queries you want to link
  5. Select the join columns - click column headers in the data preview, or choose from the dropdown
  6. Choose the filter direction
  7. Save the relationship

Each relationship connects a column in one query to a column in another, with a many-to-one cardinality. The "from" side has many rows for each row on the "to" side - like many sales rows (fact) for each store (dimension).

Filter direction

Each relationship has a filter direction that controls how cross-filtering propagates:

DirectionBehaviorTypical use
SingleFilters flow from the dimension side to the fact side onlySelecting a store filters sales, but selecting a sale does not filter stores
BothFilters flow in both directionsFull interactivity between both queries

Single direction is the standard choice for fact/dimension relationships. Bidirectional is useful when you want selecting data in either query to filter the other.

Multiple relationships

A dashboard can have many relationships, connecting multiple queries into a star schema or other data model pattern. For example, a sales fact query at the center with relationships to stores, products, dates, and customers dimension queries - giving every widget access to descriptive columns from all dimensions.

Managing relationships

The relationships dialog shows all defined relationships with their connected queries and columns. From here you can:

  • Toggle active/inactive - temporarily disable a relationship without deleting it
  • Edit - change the connected columns or filter direction
  • Delete - remove a relationship entirely

On this page