I’m trying to set up a Looker + Dataform monorepo (atomic commits, workflows, orchestration benefits etc etc etc), but I’m failing at the first step. I’m trying to organise the repository such that most of the configuration is done in the project root, and then there’s a Dataform and Looker folder respectively.
When I have an sqlx file outside of the root /definitions folder, I get this dialogue:
Dataform doesn't compile .sqlx files outside the definitions/ folder. Your .sqlx files must be saved inside the definitions/ folder to compile and be included in your workflow executions.
I want my dataform definitions to sit in ./dataform/definitions/
Is that possible?
This question has been asked here, and here, but no concrete answer has been given.
Hi Wiktok_Jurek,
You might find it helpful to check this page, which outlines a suggested solution to your repository setup challenge. It demonstrates how to structure a Dataform project to comply with compilation rules by placing definitions in the root /definitions folder, while keeping your workflow clean and maintainable.
Unfortunately not - I’m specifically asking whether the /definitions folder can be placed outside the root repository.
the simpliest answer is no. It shoot be placed in the root wher your yaml sits
No, Dataform currently requires all .sqlx files to reside in the definitions/ folder at the project root to compile and be included in workflows. Placing definitions in a nested folder like ./dataform/definitions/ is not supported, so you’ll need to keep your .sqlx files inside the root-level definitions/ folder. You can still organize other config or project files in subfolders, but Dataform’s compiler only recognizes .sqlx files in that specific location.