> For the complete documentation index, see [llms.txt](https://docs.paradime.io/app-help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.paradime.io/app-help/guides-new/data-mesh-setup/model-access.md).

# Model access

Some models are implementation details, meant for reference only within their group of related models. Other models should be accessible through the `ref` function across groups and projects. Models can set an [access modifier](https://en.wikipedia.org/wiki/Access_modifiers) to indicate their intended level of accessibility

### Configuring model access <a href="#declaring-a-group" id="declaring-a-group"></a>

You can apply access modifiers in config files, including the `dbt_project.yml`, or to models one-by-one in `properties.yml`. Applying access configs to a subfolder modifies the default for all models in that subfolder, so make sure you intend for this behavior. When setting individual model access, a group or subfolder might contain a variety of access levels, so when you designate a model with `access: public` make sure you intend for this behavior.

Use the `access` configuration to define the access level for a model. There are multiple approaches to configuring access.

{% tabs %}
{% tab title="properties.yml" %}
{% code title="models/properties\_my\_public\_model.yml" %}

```yaml
version: 2

# using the new method supported in v1.7
models:
  - name: my_public_model
    config:
      access: public 

# Older method, still supported

  - name: my_public_model_two
    access: public 
    
```

{% endcode %}
{% endtab %}

{% tab title="dbt\_project.yml" %}
{% code title="dbt\_project.yml" %}

```yaml
models:
  my_project_name:
    subfolder_name:
      +group: my_group
      +access: private  # sets default for all models in this subfolder
```

{% endcode %}
{% endtab %}

{% tab title="In-file" %}
{% code title="models/my\_public\_model.sql" %}

```sql
-- models/my_public_model.sql

{{ config(access = "public") }}

select ...
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Access level definition

The access level of the model you are declaring properties for.

| Access    | Referenceable by                                                                         |
| --------- | ---------------------------------------------------------------------------------------- |
| private   | Same group                                                                               |
| protected | Same project (or installed as a package)                                                 |
| public    | Any group, package, or project. When defined, rerun a production job to apply the change |

{% hint style="info" %}
By default, all models are `protected`. This means that other models in the same project can reference them, regardless of their group.
{% endhint %}

{% hint style="warning" %}
Models with `materialized` set to `ephemeral` cannot have the access property set to public.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.paradime.io/app-help/guides-new/data-mesh-setup/model-access.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
