Fundamentals and Practical Examples

OpenDAPI files describe data models and governance policies as code. They are typically stored alongside your application or analytics repositories, validated in CI, and referenced by data automation tools like Woven.


Folder Layout Example

A typical OpenDAPI-enabled repo might look like this:

repository/
├── project_1/
│   ├── orders.dapi.yaml
│   ├── users.dapi.yaml
│   └── ...
├── project_2/
│   ├── customers.dapi.yaml
│   ├── products.dapi.yaml
│   └── ...
├── dapis/
│   ├── company.datastores.yaml
│   ├── company.purposes.yaml
│   ├── company.teams.yaml
│   ├── company.subjects.yaml
│   └── company.categories.yaml
└── opendapi.config.yaml

Example: project_1/orders.dapi.yaml

schema: https://opendapi.org/spec/0-0-1/dapi.json
urn: woven.prisma.blog_prisma.Post
owner_team_urn: woven.teams.marketing_ops
description: This data model represents a blog post entity within the Prisma framework
  for Woven's data management platform. The data is pulled from Substack and Medium
type: entity
primary_key:
- id
fields:
- name: authorId
  data_type: int
  is_nullable: true
  description: A reference identifier linking the blog post to the author's unique
    ID, establishing authorship and allowing for relational queries.
  data_subjects_and_categories:
  - subject_urn: employee
    category_urn: id.unique_identifier
  sensitivity_level: confidential
  is_personal_data: true
  is_direct_identifier: true
datastores:
  sources:
  - urn: woven.datastores.mysql
    data:
      identifier: production_Post
    business_purposes:
    - marketing_content
    retention_days: 30
  sinks:
  - urn: woven.datastores.snowflake
    data:
      identifier: productionpost
      namespace: production.hourly
      replication_mechanism: fivetran
      origin_urn: woven.datastores.mysql
      freshness: one_hour
      replication_config_urn: fivetran_connection_one_hour
    business_purposes:
    - analytics
    retention_days: 30
privacy_requirements:
  dsr_access_endpoint: dsr.woven.api
  dsr_deletion_endpoint: dsr.woven.api
context:
  service: blog_prisma
  integration: prisma
  rel_model_path: ../prisma/schema.prisma
retention_reference: created_at

This DAPI defines the dataset contract for orders table in the project_1 project. It references policies associated with the dataset: finance (category), customer (subject), and revenue_reporting (purpose) from the dapis/company.purposes.yaml file. It is owned by the marketing_ops team, and is stored in the mysql datastore, and replicated to the snowflake datastore.


Learn More

DAPIs make your data models self-describing, auditable, and automatable — the foundation for data governance as code.