-
Notifications
You must be signed in to change notification settings - Fork 193
Description
Summary
Please add first-class support for pointing a Dataform repository to a subfolder within a Git repo. Many teams use monorepos. We want apps/dataform/ to be the project root, while keeping other apps and infra in the same repo.
We have a monorepo such as:
my-monorepo/
├── .git/
├── apps/
│ ├── react/
│ │ ├── package.json
│ │ └── ...
│ └── server/
│ ├── package.json
│ └── ...
└── packages/
└── ...
And we would like to store our dataform scripts in the same git repository to make it look like this:
my-monorepo/
├── .git/
├── apps/
│ ├── react/
│ │ ├── package.json
│ │ └── ...
│ ├── server/
│ │ ├── package.json
│ │ └── ...
│ └── dataform/
│ ├── definitions/
│ ├── package.json
│ └── workflow_settings.yaml
└── packages/
└── ...
Why this matters
- One repo, one PR, coordinated releases across app, workflows, and warehouse.
- Easier onboarding and code search.
- Aligns with common monorepo layouts and code owners.
- Avoids extra repos, submodules, subtree mirrors, or giving up the managed UI to run the CLI.
Current workarounds and drawbacks
- Separate repo: loses atomic PRs and discoverability.
- Git submodule or subtree: adds Git complexity and have to handle two PRs.
- CLI only from a subfolder: loses Managed Dataform UI, assertions view, lineage.
Proposal
Allow specifying a project path when connecting a repo and when invoking runs. For example:
// Repository settings
{
"gitRemoteSettings": {
"url": "https://github.com/org/my-monorepo.git",
"defaultBranch": "main",
"projectSubpath": "apps/dataform"
}
}# Workflow Invocation API body
gitCommitish: main
projectSubpath: apps/dataformBehavior: Dataform treats apps/dataform as the project root, looks for workflow_settings.yaml and definitions/ under that path, and scopes indexing to that subtree. If projectSubpath is absent, default to repo root for full backward compatibility.
Related discussion
Stack Overflow user request describing the same need: https://stackoverflow.com/questions/78086702/how-to-setup-google-cloud-dataform-git-connection-in-a-sub-folder-to-use-it-in-a
This small addition unlocks monorepo parity without sacrificing the managed experience.