Skip to content

feat: add finance revenue data product example#8

Open
Muhtasim-Munif-Fahim wants to merge 2 commits into
johnmikel:mainfrom
Muhtasim-Munif-Fahim:main
Open

feat: add finance revenue data product example#8
Muhtasim-Munif-Fahim wants to merge 2 commits into
johnmikel:mainfrom
Muhtasim-Munif-Fahim:main

Conversation

@Muhtasim-Munif-Fahim

Copy link
Copy Markdown

Closes #5

Adds a finance revenue data product example demonstrating:

  • Loading and validating financial transaction CSV
  • Computing daily revenue, total revenue, average transaction value
  • Creating a DataProduct with metadata, validation rules, and schema
  • Exporting the data product as JSON

Copilot AI review requested due to automatic review settings June 17, 2026 20:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a second “passing” runnable example (finance revenue) to demonstrate the manifest model beyond the existing SaaS churn sample, and wires it into the template scaffolder and examples test suite.

Changes:

  • Add examples/pass/finance-revenue manifests + synthetic CSV data and validate it in the examples tests.
  • Add a corresponding scaffoldable template under src/dataproduct_kit/templates/finance_revenue and register it in templates.py.
  • Update packaging/docs to include the new template files and list the new runnable example in the README.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_examples.py Expands the “passing examples validate” test to include finance-revenue.
src/dataproduct_kit/templates/finance_revenue/semantic.yaml Adds semantic model for the finance revenue template.
src/dataproduct_kit/templates/finance_revenue/policy.yaml Adds policy manifest for the finance revenue template.
src/dataproduct_kit/templates/finance_revenue/dataproduct.yaml Adds data product manifest (incl. freshness policy) for the finance revenue template.
src/dataproduct_kit/templates/finance_revenue/data/transactions.csv Adds synthetic transaction CSV for the template scaffold.
src/dataproduct_kit/templates/finance_revenue/contract.yaml Adds schema + quality checks for the finance revenue template dataset.
src/dataproduct_kit/templates.py Registers finance-revenue as a scaffoldable template.
README.md Mentions the new runnable passing example path.
pyproject.toml Includes the new template directory in package-data.
examples/pass/finance-revenue/semantic.yaml Adds semantic model for the runnable finance revenue example.
examples/pass/finance-revenue/policy.yaml Adds policy manifest for the runnable finance revenue example.
examples/pass/finance-revenue/dataproduct.yaml Adds data product manifest (incl. freshness policy) for the runnable example.
examples/pass/finance-revenue/data/transactions.csv Adds synthetic transaction CSV for the runnable example.
examples/pass/finance-revenue/contract.yaml Adds schema + quality checks for the runnable example dataset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +8 to +11
TEMPLATE_MAP = {
"saas-churn": "saas_churn",
"finance-revenue": "finance_revenue",
}
Comment on lines +1 to +8
metrics:
- name: net_revenue
label: Net Revenue
description: Sum of all transaction amounts in the reporting period.
dataset: transactions
expression: "sum(amount)"
grain: day
dimensions: [product_category, region]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a finance revenue data product example

2 participants