Introdução ao 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 |
Executar código Python |
%sql |
Executar consultas SQL |
%scala |
Executar código Scala |
%r |
Executar código R |
%md |
Renderizar Markdown |
%sh |
Executar comandos de shell |
$$

$$
%run executa outro notebook no mesmo contexto$$
# Carregar funções auxiliares compartilhadas
%run /Shared/utils/data_helpers
# Agora use uma função definida
# em data_helpers
clean_df = clean_nulls(raw_df)
$$
$$

$$
%run carrega funções de outros notebooks na sua sessãoIntrodução ao Databricks Lakehouse