Docs menu

Data products

A data product is a domain's tables offered to the rest of the organisation: it has an owner, an interface (the keys other domains use) and a contract that says what they can rely on. A domain is a group of tables that belong together; in Fabric, a domain is set up by a Fabric administrator, and workspaces are assigned to it.

Krusgraph proposes; you decide. domain_draft groups the plan's tables by how strongly their keys and relationships tie them together, keeps a header with its lines, names each group and writes one contract per domain in the Open Data Contract Standard (ODCS) v3.2.0. It creates nothing: your administrator creates the Fabric domain, and you decide who owns each data product. A table without a key is left unassigned, because a contract cannot promise its rows are unique.

What the engine proposes for the shop schema: customers and products, with one interface between them.

customersaddressescustomersorder_itemsordersproductscategoriesproductsaudit_log: unassigned, no keyinterface
customersaddressescustomersorder_itemsordersproductscategoriesproductsaudit_log: unassigned, no keyinterface
Generated by the engine (domain_draft) from the synthetic shop schema when this page was rendered: a proposal to review. The arrow is the interface, from the table that holds the reference to the table that owns the key.
  • customers: addresses, customers, order_items and orders. Why the name: customers is the table the others in the domain point at most.
  • products: categories and products. Why the name: products is the table the others in the domain point at most.
  • Interface: order_items.product_id → products.product_id (rule R1): customers uses the key products owns.
  • Unassigned: audit_log, no key: a contract cannot promise its rows are unique; it points at customers, place it there by hand if it belongs.

The start of the contract for the domain that uses the interface, cut from the draft the engine wrote:

apiVersion: v3.2.0
kind: DataContract
id: krusgraph-shop_lh-shop-customers
name: customers
version: "0.1.0"
status: draft
domain: customers
dataProduct: customers
# …
schema:
  - name: order_items
    # … columns, key, the other rules
    quality:
      - name: order_items_product_id_no_orphans
        description: "Every order_items.product_id with a value finds a row in products (R1)"
        dimension: consistency
        type: sql
        mustBe: 0
      # …
    relationships:
      - type: foreignKey
        from: order_items.product_id
        to: products.product_id

Status: domain_draft: Draft only. The domain proposals and their contracts are drafts to review, and nothing in Fabric is created from them. On /check the example shows the same domains on its map under Proposed domains; how the split is made is in docs/DOMAINS.md in the repository.