Skip to content

Commit

Permalink
ci-jobs: document temp schema macro limitation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aaronraff committed Oct 4, 2023
1 parent 04a1b11 commit 07b58a0
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 two 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 no dbt models are writing to that schema. dbt Cloud does not drop temporary schemas that were not 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 07b58a0

Please sign in to comment.