# pb_project.yaml

The `pb_project.yaml` file contains the overall project configuration. This includes the [`entities`]({{< ref "profiles/dev-docs/pb-project-yaml/entities.md" >}}) and [`id_types`]({{< ref "profiles/dev-docs/pb-project-yaml/id-types.md" >}}) that are used throughout the project.

## Video walkthrough

{{< youtube ZKD5IhaTgQk >}}

## Overview

The `pb_project.yaml` file is saved in the top level of a Profiles project.

```yaml
name: project_name
schema_version: version_number
connection: connection_name
model_folders:
    - directories
entities:
    <entity-config>
id_types:
    <id_type-config>
python_requirements: # Optional
    - python_package==version
carry_forward_privileges: true / false
```

| Field | Description |
| :----------------- | :------------------------- |
| `name` <br/> <span style="color: #4D4DFF;font-size:12px;">Required</span> | Project name. |
| `schema_version` <br/> <span style="color: #4D4DFF;font-size:12px;">Required</span> | Project’s YAML version. |
| `connection` <br/> <span style="color: #4D4DFF;font-size:12px;">Required</span> | Connection name from [`siteconfig.yaml`]({{< ref "profiles/dev-docs/site-configuration-file.md" >}}). |
| `model_folders` <br/> <span style="color: #4D4DFF;font-size:12px;">Required</span> | Path to the folder containing the model files. |
| [`entities`]({{< ref "profiles/dev-docs/pb-project-yaml/entities.md" >}}) <br/> <span style="color: #4D4DFF;font-size:12px;">Required</span> | List of entities used in the project. |
| [`id_types`]({{< ref "profiles/dev-docs/pb-project-yaml/id-types.md" >}}) <br/> <span style="color: #4D4DFF;font-size:12px;">Required</span> | Configuration of all ID types across all entities. |
| `python_requirements` | List of Python packages and versions required for the project, specifically used for controlling the Profiles version. |
| `carry_forward_privileges` | Boolean that determines whether the privileges granted on the views should be retained after the view definitions are updated. This resolves the issue where recreating views for each model in the project led to revoked privileges. <br /><br />**Note**: Using this key can lead to some performance overhead. |

## Example

```yaml
# Project name
name: sample_attribution
schema_version: 85
connection: prod-db-profile
model_folders:
  - models
entities:
  - name: user
    id_column_name: user_rud_id # Optional
    id_types:
      - user_id
      - anonymous_id
      - email
    feature_views:
      using_ids:
        - id: email
          name: customer_profile_by_email
id_types:
  - name: anonymous_id
  - name: email
    filters:
      - type: include
        regex: ".+@.+"
    maximum_edges:
      - anonymous_id: 2
      - user_id: 1
  - name: user_id
    filters:
      - type: exclude
        value: "test"

carry_forward_privileges: false
```

