dbt-labs / dbt-labs/dbt

[Feature] Add a flag to clone to skip selected models that don't exist

Open
#10,841 1 comment 0 reactions 0 assignees View on GitHub
clone engine:v1 status:triage type:feature
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

### Is this your first time submitting a feature request?

- [X] I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
- [X] I have searched the existing issues, and I could not find an existing issue for this feature
- [X] I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

### Describe the feature

There should be an option for the dbt clone command to skip models that don't exist in the source schema instead of failing.

### Describe alternatives you've considered

This can be done manually via a query run against the catalog to find out what tables exist in the source with the results of that used to construct the select statement in the clone command.

### Who will this benefit?

My use case for this is a slim-ci variant where we clone data from production to our CI schema and then only rebuild modified tables. However, this breaks if a new model has been merged to main since the last time our production dbt job has run (since clone tries to copy a table that doesn't yet exist).

### Are you interested in contributing this feature?

_No response_

### Anything else?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.