Skip to content

Commit

Permalink
ci-jobs: document temp schema macro limitation (#4187)
Browse files Browse the repository at this point in the history
## What are you changing in this pull request and why?

Converts the "Temporary schemas aren't dropping" section into a list of
items. The first item remains the same, but a new item was added to note
that schemas will not be dropped unless they were written to as a result
of running a dbt model.

## Checklist
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [ ] Add a checklist item for anything that needs to happen before this
PR is merged, such as "needs technical review" or "change base branch."
  • Loading branch information
nghi-ly authored Oct 6, 2023
2 parents 240bce9 + b2ddeae commit 0fa8b1b
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions website/docs/docs/deploy/ci-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,18 @@ If you're experiencing any issues, review some of the common questions and answe
<details>
<summary>Temporary schemas aren't dropping</summary>
<div>
<div>If your temporary schemas aren't dropping after a PR merges or closes, this typically indicates you have overridden the <code>generate_schema_name</code> macro and it isn't using <code>dbt_cloud_pr_</code> as the prefix.<br></br><br></br> To resolve this, change your macro so that the temporary PR schema name contains the required prefix. For example:
<div>If your temporary schemas aren't dropping after a PR merges or closes, this typically indicates one of these issues:
<ul>
<li> You have overridden the <code>generate_schema_name</code> macro and it isn't using <code>dbt_cloud_pr_</code> as the prefix.<br></br><br></br> To resolve this, change your macro so that the temporary PR schema name contains the required prefix. For example:
<br></br><br></br>
• ✅ Temporary PR schema name contains the prefix <code>dbt_cloud_pr_</code> (like <code>dbt_cloud_pr_123_456_marketing</code>) <br></br>
• ❌ Temporary PR schema name doesn't contain the prefix <code>dbt_cloud_pr_</code> (like <code>marketing</code>). <br></br>
✅ Temporary PR schema name contains the prefix <code>dbt_cloud_pr_</code> (like <code>dbt_cloud_pr_123_456_marketing</code>). <br></br>
❌ Temporary PR schema name doesn't contain the prefix <code>dbt_cloud_pr_</code> (like <code>marketing</code>). <br></br>
</li>
<br/>
<li>
A macro is creating a schema but there are no dbt models writing to that schema. dbt Cloud doesn't drop temporary schemas that weren't written to as a result of running a dbt model.
</li>
</ul>
</div>
</div>
</details>
Expand Down Expand Up @@ -153,6 +161,3 @@ If you're experiencing any issues, review some of the common questions and answe
If you're on a Virtual Private dbt Enterprise plan using security features like ingress PrivateLink or IP Allowlisting, registering CI hooks may not be available and can cause the job to fail silently.</div>
</div>
</details>



0 comments on commit 0fa8b1b

Please sign in to comment.