Skip to content

Stamp dbt_spellbook provenance and explicit public/visible on spell properties#9593

Open
a-monteiro wants to merge 2 commits intomainfrom
andre/dwh-317-dbt-created-by-provenance
Open

Stamp dbt_spellbook provenance and explicit public/visible on spell properties#9593
a-monteiro wants to merge 2 commits intomainfrom
andre/dwh-317-dbt-created-by-provenance

Conversation

@a-monteiro
Copy link
Copy Markdown
Member

@a-monteiro a-monteiro commented Apr 22, 2026

Set dune.created_by=dbt_spellbook, dune.public, and dune.visible in the four shared property macros (mark_as_spell, expose_spells, hide_spells, expose_dataset) so that every spell lands with an explicit provenance tag and visibility state on the Dune catalog service. The baseline mark_as_spell applies to every model via the project-level post-hook; expose_spells/hide_spells/expose_dataset override as before.

Towards DWH-317

@github-actions github-actions Bot added the WIP work in progress label Apr 22, 2026
Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@a-monteiro a-monteiro force-pushed the andre/dwh-317-dbt-created-by-provenance branch from c8dcd23 to fc0ff9b Compare April 22, 2026 19:28
…roperties

Set dune.created_by=dbt_spellbook, dune.public, and dune.visible in the
four shared property macros (mark_as_spell, expose_spells, hide_spells,
expose_dataset) so that every spell lands with an explicit provenance
tag and visibility state on the Dune catalog service. The baseline
mark_as_spell applies to every model via the project-level post-hook;
expose_spells/hide_spells/expose_dataset override as before.

Also document the dbt Cloud and CI runner profile changes required for
the catalog service migration, since they cannot be configured via this
repo.

Towards DWH-317
@a-monteiro a-monteiro force-pushed the andre/dwh-317-dbt-created-by-provenance branch from fc0ff9b to 1e637eb Compare April 22, 2026 19:29
@jeff-dude jeff-dude marked this pull request as ready for review May 4, 2026 20:13
@cursor
Copy link
Copy Markdown

cursor Bot commented May 4, 2026

PR Summary

Medium Risk
Medium risk because it changes table/view property metadata that controls catalog visibility for spells/datasets in prod, which could unintentionally expose or hide assets if misconfigured.

Overview
Sets explicit Trino extra properties on all prod spell/dataset macros to ensure consistent provenance and visibility state.

expose_spells/expose_dataset now stamp dune.created_by=dbt_spellbook and explicitly set dune.public=true and dune.visible=true, while mark_as_spell and hide_spells stamp dune.created_by and force dune.visible=false (keeping dune.public=true).

Reviewed by Cursor Bugbot for commit 28f6a68. Configure here.

@github-actions github-actions Bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels May 4, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: hide_spells now sets dune.public to true
    • Reverted dune.public from 'true' back to 'false' in the hide_spells macro to restore the original access-restriction behavior.

Create PR

Or push these changes by commenting:

@cursor push 992c547d46
Preview (992c547d46)
diff --git a/dbt_macros/dune/config_trino_properties.sql b/dbt_macros/dune/config_trino_properties.sql
--- a/dbt_macros/dune/config_trino_properties.sql
+++ b/dbt_macros/dune/config_trino_properties.sql
@@ -40,7 +40,7 @@
   {%- if target.name == 'prod' -%}
     {%- set properties = {
             'dune.created_by': 'dbt_spellbook',
-            'dune.public': 'true',
+            'dune.public': 'false',
             'dune.visible': 'false',
             'dune.data_explorer.category': 'abstraction',
             'dune.vacuum': '{"enabled":true}'

You can send follow-ups to the cloud agent here.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 28f6a68. Configure here.

Comment thread dbt_macros/dune/config_trino_properties.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review this PR development is complete, please review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants