Pengantar Databricks Lakehouse
Gang Wang
Senior Data Scientist
$$
my_project/
|-- databricks.yml
|-- src/
| |-- etl_pipeline.py
| |-- data_quality.py
|-- resources/
| |-- jobs/
| | |-- nightly_etl.yml
| |-- pipelines/
| |-- sales_pipeline.yml
|-- tests/
|-- test_etl.py
$$
databricks.yml - berkas konfigurasi pusatsrc/ - notebook dan kode Andaresources/ - definisi job dan pipelinetests/ - berkas uji opsionalbundle:
name: sales_analytics
workspace:
host: https://myworkspace.databricks.com
targets:
dev:
default: true
workspace:
root_path: /Users/me/dev
production:
workspace:
root_path: /Shared/production
permissions:
- level: CAN_MANAGE
group_name: data_engineers
$$

$$
resources:
jobs:
nightly_etl:
name: "Nightly ETL Pipeline"
schedule:
quartz_cron: "0 0 2 * * ?"
tasks:
- task_key: ingest
notebook_task:
notebook_path: src/etl.py
$$
| Command | Tujuan |
|---|---|
bundle validate |
Memeriksa kesalahan konfigurasi |
bundle deploy |
Menerapkan ke target |
bundle run |
Memicu job yang diterapkan |
bundle destroy |
Menghapus resources yang diterapkan |
$$
# Validasi sebelum menerapkan
databricks bundle validate
# Terapkan ke production
databricks bundle deploy \
--target production
# Picu satu run
databricks bundle run nightly_etl

$$
$$
databricks.yml mendefinisikan proyek, target, dan resources Andavalidate, deploy, run, destroyPengantar Databricks Lakehouse