Skip to content

[FAQ] Can I have multiple Bruin projects inside the same Git repository? #189

@elcapo

Description

@elcapo

Course

data-engineering-zoomcamp

Question

Can I have multiple Bruin projects inside the same Git repository?

Answer

Yes, but because bruin init automatically places the .bruin.yml in the Git root, you need to manually relocate the config file and explicitly tell Bruin where it lives. Why does this happen?

When you run:

bruin init

Bruin detects the nearest .git directory in the parent folders and creates the .bruin.yml there. So if your repository looks like this:

repo/
├── .git/
└── data-platforms/

the config file will be created in repo/, even if you run the command inside data-platforms/.

Example scenario

You want a monorepo with multiple Bruin projects:

repo/
├── .git/
└── data-platforms/
    ├── project-a/
    └── project-b/

Initialize the repository

mkdir -p repo/data-platforms
cd repo
git init

Create a Bruin project inside a subfolder

cd data-platforms
bruin init project-a

At this point, Bruin will create the .bruin.yml directly in the repo/ folder. But you can move it:

mv .bruin.yml data-platforms/project-a/

Then run Bruin commands by explicitly pointing to that config:

cd data-platforms/project-a
bruin validate --config-file .bruin.yml

Checklist

  • I have searched existing FAQs and this question is not already answered
  • The answer provides accurate, helpful information
  • I have included any relevant code examples or links

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions