CommencerCommencez gratuitement

Targeting the streaming engine

You're back with the Seattle library team. Their checkout history is growing, and queries are starting to flirt with memory limits. The simplest fix is to run lazy queries on Polars' streaming engine instead of the default in-memory one.

polars is loaded as pl. The LazyFrame monthly_digital is pre-loaded and totals digital checkouts by month.

Cet exercice fait partie du cours

<cours>Scaling and Optimizing Data Pipelines with Polars</cours>
Voir le cours

Instructions de l’exercice

  • Run monthly_digital using the streaming engine.

Exercice interactif pratique

Essayez cet exercice en complétant ce code d’exemple.

# Run the query on the streaming engine
result = monthly_digital.collect(____="____")
print(result)
Modifier et exécuter le code