Skip to content

Feat(dbt): Add support for adapter.rename_relation#5188

Merged
vchan merged 3 commits intomainfrom
vchan/adapter-rename-relation
Aug 19, 2025
Merged

Feat(dbt): Add support for adapter.rename_relation#5188
vchan merged 3 commits intomainfrom
vchan/adapter-rename-relation

Conversation

@vchan
Copy link
Contributor

@vchan vchan commented Aug 19, 2025

No description provided.

@vchan vchan requested review from a team and Copilot August 19, 2025 19:06
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.rename_relation method in the dbt adapter implementation. This allows dbt templates to rename database tables/relations through the adapter interface.

  • Added abstract rename_relation method to the base adapter classes
  • Implemented concrete rename_relation method in the runtime adapter that uses the engine adapter's rename_table functionality
  • Added test coverage to verify the rename functionality works correctly

Reviewed Changes

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

File Description
sqlmesh/dbt/adapter.py Adds abstract and concrete implementations of rename_relation method
tests/dbt/test_adapter.py Adds test case to verify rename_relation functionality
Comments suppressed due to low confidence (1)

sqlmesh/dbt/adapter.py:17

  • [nitpick] This import removal appears unrelated to the rename_relation feature. Consider separating unrelated changes into different commits or PRs for better change tracking.
    import agate

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

@vchan vchan force-pushed the vchan/adapter-rename-relation branch from 712931d to 3810b48 Compare August 19, 2025 22:18
@vchan vchan merged commit acf7f7e into main Aug 19, 2025
27 of 28 checks passed
@vchan vchan deleted the vchan/adapter-rename-relation branch August 19, 2025 23:05
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