Introduction to Databricks Lakehouse
Gang Wang
Senior Data Scientist
$$

$$
# Default language: Python
df = spark.table("silver_taxi_trips")
display(df)
%sql
SELECT COUNT(*) AS total_trips
FROM silver_taxi_trips
%md
## Analysis notes
Revenue is **highest** in the Northeast region.
$$
| Command | Purpose |
|---|---|
%python |
Run Python code |
%sql |
Run SQL queries |
%scala |
Run Scala code |
%r |
Run R code |
%md |
Render Markdown |
%sh |
Run shell commands |
$$

$$
%run executes another notebook in the same context$$
# Load shared helper functions
%run /Shared/utils/data_helpers
# Now use a function defined
# in data_helpers
clean_df = clean_nulls(raw_df)
$$
$$

$$
%run loads functions from other notebooks into your sessionIntroduction to Databricks Lakehouse