4. Meet Dataform: SQL pipelines made tidy
4.2 Repository, workspace and settings
Highlights & notes
Select lesson text to highlight it, or tap Add note.
Bookmarks
Bookmark a lesson to see it here.
A Dataform project lives in a repository: one folder that holds all the code, tracked by Git. Think of it as the class notebook that the whole team shares.
You do not write in the shared notebook directly. You open a development workspace: your own private copy. You edit, test and then commit your changes, like handing in homework. Nobody else is disturbed while you work.
Inside the repository:
definitions/: your SQLX files. One file makes one table, view or test.includes/: small JavaScript helpers that many files can shareworkflow_settings.yaml: the default settings of the project
workflow_settings.yaml
The defaults for every file in the repository.
defaultProject: shop-dev
defaultLocation: asia-south1
defaultDataset: dataform
defaultAssertionDataset: dataform_assertions
dataformCoreVersion: 3.0.0What each setting means
defaultProject: the Google Cloud project where tables are builtdefaultLocation: the BigQuery region, for exampleasia-south1(Mumbai)defaultDataset: the dataset used when a file does not name onedefaultAssertionDataset: where test results are kept
Older projects have a dataform.json file instead. Since Dataform core 3.0 the settings file is workflow_settings.yaml. The idea is the same and only the key names differ: defaultDatabase became defaultProject, and defaultSchema became defaultDataset.
How it fits together
- Repository: team code
- Workspace: your copy
- Commit → shared again
Where will this table be built?
The file is definitions/orders.sqlx. The settings say defaultProject: shop-dev and defaultDataset: dataform.
SQLX
config { type: "table", schema: "silver"}SELECT * FROM ${ref("orders_raw")}
Result
shop-dev.silver.orders
Try it yourself
1. In your workspace, click Initialize workspace. Dataform creates the starter files.
2. Open workflow_settings.yaml and find defaultDataset.
3. Set defaultLocation to the region where your BigQuery datasets live, then click Commit.
Question 1 · Easy
Where do your SQLX files go?
Question 2 · Medium
Why does each developer use a development workspace?
Question 3 · Hard
A file has no schema in its config. The settings say defaultDataset: dataform. Where is the table built?
Key takeaways
A repository holds the team's code and a workspace is your private copy. SQLX files live in definitions/, helpers in includes/, and workflow_settings.yaml holds the default project, region and dataset.
Save your progress
Start free and your progress, code and notes stay saved. Free for 1 month, no card needed.
Start free Log in