Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CT-2968] [ModelGov3] Allow access to be set as config, including in dbt_project.yml #8383

Closed
1 task done
Tracked by #7979
jtcohen6 opened this issue Aug 14, 2023 · 4 comments · Fixed by #8635
Closed
1 task done
Tracked by #7979
Assignees
Labels
enhancement New feature or request model_groups_access Issues related to groups

Comments

@jtcohen6
Copy link
Contributor

jtcohen6 commented Aug 14, 2023

Housekeeping

  • I am a maintainer of dbt-core

Short description

Allow users to set access like any other config, including in dbt_project.yml, so that an entire subfolder of models can be marked access: private or access: public.

While there is a risk of users accidentally promoting a set of intermediate models to public access, we should make this promotion / "FYI" flow part of the UX in dbt Cloud, rather than a restriction within the framework of dbt-core.

Acceptance criteria

As an end user, I can set access in three places:

  • in-file using {{ config() }} (Jinja-SQL models) or dbt.config() (Python models)
  • in config: block within yaml properties (in addition to current top-level key, for back-compat)
  • in dbt_project.yml for all models in a subfolder

As a metadata consumer, nothing changes — access should always be promoted to a node-level attribute in manifest.json (similar to meta or `tags).

Impact to Adapters

zero impact

Context

Context & conversation:

@jtcohen6 jtcohen6 added enhancement New feature or request model_groups_access Issues related to groups labels Aug 14, 2023
@github-actions github-actions bot changed the title [ModelGov3] Allow access to be set as config, including in dbt_project.yml [CT-2968] [ModelGov3] Allow access to be set as config, including in dbt_project.yml Aug 14, 2023
@graciegoheen
Copy link
Contributor

From estimation meeting: there may be some test cases that need to be added and some test cases that will need to be updated

@jaklan
Copy link

jaklan commented Nov 3, 2023

UPDATE: I have tried to recreate the issue by myself today (the initial one was reported by @jamyz89), but I wasn't able to - it worked as expected. We will try to investigate it on our side what was the reason.


Hi guys, is it expected behaviour that group config is not applied to all the subdirectories (== is not inherited)?

Such setup:

image

gives us:

Parsing Error
  Node model.gtm_glo_src.data_source_x attempted to reference node model.gtm_glo_src.data_source_x_raw, which is not allowed because the referenced node is private to the 'data_sources' group.

cc: @gshank

@kogutj
Copy link

kogutj commented Nov 3, 2023

Attached meta.txt for the context to the above. Seems like those 3 models are in the same group data_sources, as expected, however data_source_x cannot ref to the private model data_source_x_raw.
meta.txt

@graciegoheen
Copy link
Contributor

^ I initially thought your issue might have been related to this bug #8697 but it looks like that was already resolved. Please let me know if you run into the same issue again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request model_groups_access Issues related to groups
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants