Skip to content

Feat(dbt): Add support for adapter.expand_target_column_types#5206

Merged
vchan merged 5 commits intomainfrom
vchan/adapter-expand-target-column-types
Aug 22, 2025
Merged

Feat(dbt): Add support for adapter.expand_target_column_types#5206
vchan merged 5 commits intomainfrom
vchan/adapter-expand-target-column-types

Conversation

@vchan
Copy link
Contributor

@vchan vchan commented Aug 21, 2025

No description provided.

@vchan vchan requested a review from Copilot August 21, 2025 22:51
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 adds support for the adapter.expand_target_column_types dbt method in SQLMesh. The feature allows expanding column types in a target table to match those of a source table when safe to do so (e.g., increasing varchar length).

Key changes:

  • Implements the expand_target_column_types method in the adapter interface
  • Adds logic to compare column types and generate appropriate ALTER TABLE statements
  • Updates documentation to reflect the newly supported method

Reviewed Changes

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

File Description
sqlmesh/dbt/adapter.py Adds abstract method definition and concrete implementation for expanding column types
tests/dbt/test_adapter.py Adds comprehensive test coverage for the new expand_target_column_types functionality
docs/integrations/dbt.md Removes expand_target_column_types from unsupported methods list

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

@vchan vchan requested a review from a team August 21, 2025 23:17
@vchan vchan marked this pull request as ready for review August 21, 2025 23:17
@vchan vchan enabled auto-merge (squash) August 22, 2025 17:10
@vchan vchan force-pushed the vchan/adapter-expand-target-column-types branch from 63493ab to b6e5eab Compare August 22, 2025 17:22
@vchan vchan merged commit 3d144c5 into main Aug 22, 2025
28 checks passed
@vchan vchan deleted the vchan/adapter-expand-target-column-types branch August 22, 2025 19:52
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.

3 participants