npm.io
1.6.27 • Published 7h ago

@duckcodeailabs/dql-governance

Licence
Apache-2.0
Version
1.6.27
Deps
2
Size
111 kB
Vulns
0
Weekly
0
Stars
2

@duckcodeailabs/dql-governance

Governance helpers for testing, certification, policy checks, and cost estimation.

This package is useful when you want to turn DQL blocks into durable, reviewable analytics assets instead of one-off queries.

Install

pnpm add @duckcodeailabs/dql-governance

Example

import { TestRunner } from '@duckcodeailabs/dql-governance';

const runner = new TestRunner({
  async execute(sql) {
    return [{ value: sql.includes('42') ? 42 : 0 }];
  },
});

const result = await runner.runTests(
  [
    {
      name: 'revenue is positive',
      sql: 'select 42 as value',
      operator: '>',
      threshold: 0,
    },
  ],
);

console.log(result.passed, result.failed);

Common Uses

  • run DQL tests {} assertions in CI
  • apply certification rules before promotion
  • estimate cost and enforce policy checks

Learn More