Skip to content

feat(aml): add lineage command for extracting metadata#17

Open
nvquanghuy wants to merge 1 commit intomasterfrom
feature/lineage-command
Open

feat(aml): add lineage command for extracting metadata#17
nvquanghuy wants to merge 1 commit intomasterfrom
feature/lineage-command

Conversation

@nvquanghuy
Copy link
Copy Markdown

Summary

  • Adds new holistics aml lineage [path] command to extract lineage metadata from compiled AML projects
  • Outputs a normalized JSON structure optimized for integration with data catalogs (e.g., DataHub)
  • Parses models, datasets, dashboards, and charts with their relationships
  • Supports options: --output <file>, --entities <filter>, --compact

Changes

  • src/lineage.ts: New module with lineage transformation logic
  • src/index.ts: Modified to add the lineage subcommand under aml
  • src/tests/lineage.test.ts: Comprehensive test coverage
  • src/tests/fixtures/compiled-sample.json: Test fixtures
  • package.json: Added vitest and test scripts
  • holistics: Wrapper script for local development

Test plan

  • Run npm test to verify all tests pass
  • Run holistics aml lineage . on a sample AML project
  • Verify output includes models, datasets, dashboards, charts, and lineage edges
  • Test with --output, --entities, and --compact options

🤖 Generated with Claude Code

Adds a new `holistics aml lineage` command that extracts lineage metadata
from compiled AML projects and outputs a normalized JSON structure optimized
for integration with data catalogs like DataHub.

Features:
- Parses TableModel and QueryModel entities with fields (dimensions/measures)
- Extracts Dataset and Dashboard entities with chart definitions
- Builds lineage edges: model->source, dataset->model, chart->model, dashboard->chart
- Supports multiple table name formats (BigQuery, PostgreSQL, simple)
- Options: --output file, --entities filter, --compact JSON

Includes comprehensive tests with vitest.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nvquanghuy nvquanghuy requested a review from khanhhuy March 31, 2026 08:56
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.

1 participant