Introducción a 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 |
Ejecutar código Python |
%sql |
Ejecutar consultas SQL |
%scala |
Ejecutar código Scala |
%r |
Ejecutar código R |
%md |
Renderizar Markdown |
%sh |
Ejecutar comandos de shell |
$$

$$
%run ejecuta otro notebook en el mismo contexto$$
# Cargar funciones auxiliares compartidas
%run /Shared/utils/data_helpers
# Ahora usa una función definida
# en data_helpers
clean_df = clean_nulls(raw_df)
$$
$$

$$
%run carga funciones de otros notebooks en tu sesiónIntroducción a Databricks Lakehouse