Skip to content

Conversation

@paco-valdez
Copy link
Member

No description provided.

@paco-valdez paco-valdez requested a review from Copilot October 22, 2025 22:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances primary key detection in cube_dbt by adding support for dbt 1.5+ constraints and test-based detection, while also introducing orjson as an optional performance optimization for JSON parsing.

Key Changes:

  • Added primary key detection from dbt constraints (type: 'primary_key')
  • Implemented fallback detection via unique + not_null test combinations
  • Integrated orjson for faster manifest parsing with graceful fallback to standard json

Reviewed Changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/cube_dbt/model.py Added constraint-based primary key detection with priority over test-based detection
src/cube_dbt/column.py Enhanced primary_key property to detect keys from tests (unique + not_null)
src/cube_dbt/dbt.py Added test index building and orjson integration for performance
pyproject.toml Bumped version to 0.6.3 and added orjson dependency
tests/test_model.py Added comprehensive unit tests for new primary key detection methods
tests/test_dbt.py Added integration tests for primary key detection from tests and constraints
tests/manifest.json Added test fixtures and constraint data to support new tests
QUICK_REFERENCE.md New quick reference documentation
CLAUDE.md New AI assistant guidance documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@paco-valdez paco-valdez merged commit 8201ee7 into main Oct 22, 2025
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