Newshot

Building Data Products with AI

Original text(via HN AI)

Build a data product with AI.

A coding agent builds it. You give it three inputs: a data contract (what), skills (how), and a data marketplace (the data to build on).

The whole journey in 2 minutes.

Building Data Products with AI: a coding agent builds the data product contract-first, from three inputs. A data contract as the what, defined together in a workshop, skills with your conventions as the how, and a data marketplace as the data to build on. One prompt, and the agent builds and tests the data product.

Then scroll on, and follow every step yourself.

From conversation to data contract

Maxi (category manager) needs to know which brands barely sell. John owns the sales data. Each answer becomes part of the contract.


        apiVersion: v3.1.0
kind: DataContract
id: slow-selling-brands
name: Slow Selling Brands
version: 1.0.0
status: draft
description:
  purpose: Find brands that barely sell
  usage: Brand talks, campaigns, assortment decisions
  limitations: Not for rating individual buyers
schema:
  - name: slow_selling_brands
    physicalType: table
    properties:
      - name: brand
        logicalType: string
        required: true
        authoritativeDefinitions:
          - type: semantics
            url: ontology/brand#brand-name
      - name: slow_selling_products
        logicalType: integer
        required: true
        description: No sale in the last 6 months, returns are not sales
      - name: latest_sold_date
        logicalType: date
        description: When a product of the brand last sold
    quality:
      - type: sql
        description: One row per brand
        query: SELECT COUNT(*) - COUNT(DISTINCT brand) FROM slow_selling_brands
        mustBe: 0
slaProperties:
  - property: freshness
    value: 1
    unit: d
team:
  name: sales
servers:
  - server: production
    type: snowflake
    account: acme-eu1
    database: SALES_PROD
    schema: slow_selling_brands_v1
      

The skill hub for building data products.

Open skill libraries with skills, templates, and hooks that any coding agent reads. Pick one from the skill hub, then adapt it to your conventions.

Browse all skill libraries in the skill hub →

Implement a data product

Turns a data product from Entropy Data into a working dbt pipeline, and proves it works.

  • Pre-checksdbt project exists, all four CLIs are installed, entropy-data connection test succeeds.
  • Resolve the data productentropy-data dataproducts get: name, owner, output ports.
  • Fetch the data contractentropy-data datacontracts get, saved under models/output_ports/v1/.
  • Translate the schema to dbtOne model per contract table, columns cast to Snowflake types, tests from the contract.
  • Wire the input portsEach approved access becomes a dbt source, with the upstream contract as a trust snapshot.
  • dbt parseFix obvious mistakes before anything runs.
  • dbt-ol runMaterializes the tables in Snowflake and ships lineage to Entropy Data.
  • dbt testnot_null, unique, and accepted_values from the contract.
  • datacontract testChecks the live Snowflake data against every rule in the contract.
  • Stamp as builder-managedMarks the data product in Entropy Data as built with this plugin.
  • Final reportStatus of every artifact: created, updated, passed, failed.

Build on other data products.

The agent searches the data marketplace for data products to build on, reads their contracts, and requests access. Search like the agent does.

Current articles with brand, category, and list price.

skustring→ SKU
brand_namestring→ Brand name
categorystring
list_pricedecimal

Articles without a sale in the last six months.

skustring→ SKU
last_sold_datedate
stockinteger

All orders and line items, updated hourly.

Customer master data. Contains personal data.

Daily stock per article and warehouse.

Returned items with reason codes.

Sessions and page views from the web shop.

List price changes per article.

Illustrative marketplace. The two highlighted data products are the ones the agent builds on below. Hover them to preview their data contracts.

Implement it.

One prompt. The agent uses the contract, the skills from dataproduct-builder-demo (one of the libraries in the skill hub), and the marketplace, then runs the pipeline and publishes the result.

The fully operationalized data product

The agent produced a complete dbt project, built on articles-latest and shelf-warmers: 41 brands in Snowflake, 3/3 dbt tests and 11/11 contract tests green.


        with shelf_warmers as (select * from {{ ref('shelf_warmers') }}),
     articles      as (select * from {{ ref('articles_latest') }})

select
  a.brand_name::varchar         as brand,
  count(*)::integer            as slow_selling_products,
  max(sw.last_sold_date)::date as latest_sold_date
from shelf_warmers sw
join articles a on sw.sku = a.sku   -- same concept in the semantics
group by a.brand_name
      
ResultCheckFieldType
✓ passedTable existsslow_selling_brandsschema
✓ passedField is presentbrandschema
✓ passedField is presentslow_selling_productsschema
✓ passedField is presentlatest_sold_dateschema
✓ passedType is stringbrandschema
✓ passedType is integerslow_selling_productsschema
✓ passedType is datelatest_sold_dateschema
✓ passedRequired: no null valuesbrandschema
✓ passedRequired: no null valuesslow_selling_productsschema
✓ passedOne row per brandslow_selling_brandsquality
✓ passedFreshness: within 1 daylatest_sold_dateSLA

What it takes to build this yourself.

Three steps, all open source or free. Then every new data product starts the same way: with a data contract.

Set up Entropy Data as your data marketplace

The free Community Edition runs anywhere Docker runs. Register your existing data products, so the agent can find them, read their contracts, and request access.


        docker compose up --detach
      

Customize the skills with Claude Code

Fork a skill library from the hub as a base. Point Claude Code at one of your exemplary data products and let it adapt the skills to your platform, conventions, and policies.


        > Adapt these skills to how we build data products. Use <our best data product repo> as the reference.
      

Begin with your first data contract

Write down what the data product must deliver, together with business, producers, and consumers, in the Data Contract Editor. Then tell your agent to implement it.

More episodes, 2 minutes each.

Animated explainer videos by Entropy Data. Each episode answers one question about data products, data contracts, and semantics.

Data Contracts and Data Products

Answers “What is a data product, and how does it relate to data contracts?”

Data Contracts

Answers “What is a data contract, and why do you need one?”

Put Your Data Under Contract

Answers “How do you put an existing table under a data contract?”

Data Contracts with dbt

Answers “How do you use data contracts in a dbt project?”

Data Contracts and Semantics

Answers “How do AI agents know what your data means?”

Questions

A data product is a unit of data, code, and metadata, owned by one team, that offers its data to others through output ports. Each output port is described by a data contract. Data products are defined in the Open Data Product Standard (ODPS).

A data contract is a YAML document in the Open Data Contract Standard (ODCS) that states everything guaranteed about a dataset: schema, semantics, data quality rules, SLAs, owner, terms of use, and where the data lives. The open-source Data Contract CLI tests real data against it.

Give a coding agent such as Claude Code three inputs: a data contract that says what to build, a skill library that says how to build it (pick one from the skill hub), and a data marketplace with the data to build on. Then prompt it to implement the data product. The agent requests access to input data products, generates a dbt project, runs the pipeline, tests the data against the contract, and publishes the data product with test results and lineage.

Contract-first means agreeing on the data contract with the business and the consumers before any data is extracted or any pipeline is written. The contract becomes the specification the coding agent implements and the test the result must pass.

The Open Data Contract Standard (ODCS) and the Open Data Product Standard (ODPS) from the Linux Foundation, Apache Ossie for semantics, dbt and Snowflake for the pipeline, the Data Contract CLI and Data Product CLI for testing and publishing, and Entropy Data as the data marketplace.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗