Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (57 loc) · 2.84 KB
/
Copy pathMakefile
File metadata and controls
72 lines (57 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Shortcuts around uv + dlt + dbt. Run `make help` to list targets.
# On Windows, run these from Git Bash (the Makefile uses POSIX sh).
# .env is loaded automatically via `dotenv` for dlt scripts; for dbt targets we export vars here.
DBT_DIR := transformation/dbt_databricks
# dbt looks for profiles.yml in --profiles-dir; we keep it next to the project.
# auth_type: oauth in profiles.yml reads ~/.databrickscfg (CLI login) — no env-file needed for dbt.
DBT := uv run dbt --project-dir $(DBT_DIR) --profiles-dir $(DBT_DIR)
.DEFAULT_GOAL := help
.PHONY: help setup doctor doctor-online lint fmt \
agent-gate \
dlt-rest dlt-sql dlt-merge dlt-cdc dlt-iceberg dlt-contracts dlt-zerobus \
dbt-deps dbt-parse dbt-build dbt-test e2e e2e-duckdb
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN{FS=":.*?## "}{printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
setup: ## Create the venv and install all deps (incl. dev group)
uv sync
$(DBT) deps
doctor: ## Check local readiness for dlt, dbt, Databricks CLI, and bundle config
uv run python orchestration/doctor.py
doctor-online: ## Run doctor plus authenticated Databricks bundle validation
uv run python orchestration/doctor.py --online
agent-gate: ## Build an agent-ready claims quality gate packet (offline sample by default)
uv run python orchestration/agentic_quality_gate.py --sample
lint: ## Ruff lint
uv run ruff check .
fmt: ## Ruff format
uv run ruff format .
# --- dlt ingestion ---
dlt-rest: ## Run the REST API -> Databricks example
uv run python ingestion/pipelines/rest_api_to_databricks.py
dlt-sql: ## Run the SQL database -> Databricks example
uv run python ingestion/pipelines/sql_database_to_databricks.py
dlt-merge: ## Run the merge/incremental advanced example
uv run python ingestion/advanced/merge_incremental.py
dlt-cdc: ## Mirror two complete snapshots, including deletions (Databricks or DuckDB)
uv run python ingestion/advanced/cdc_merge.py
dlt-iceberg: ## Run the Iceberg table_format advanced example
uv run python ingestion/advanced/iceberg_table_format.py
dlt-contracts: ## Run the schema-contracts advanced example
uv run python ingestion/advanced/data_contracts.py
dlt-zerobus: ## Append events with Databricks Zerobus (workspace + service principal required)
uv run python ingestion/advanced/zerobus_append.py
# --- dbt transformation ---
dbt-deps: ## Install dbt packages
$(DBT) deps
dbt-parse: ## Parse the dbt project (no warehouse writes)
$(DBT) parse
dbt-build: ## Run + test all dbt models
$(DBT) build
dbt-test: ## Run dbt tests only
$(DBT) test
# --- end to end ---
e2e: ## Run dlt ingestion then dbt build in one process (Databricks)
uv run python orchestration/run_e2e.py
e2e-duckdb: ## Warehouse-free lane: dlt -> DuckDB -> dbt -> quality gate (what CI runs)
uv run python orchestration/run_e2e.py --lane duckdb