New to Kestra?
Use blueprints to kickstart your first workflows.
Cache a slow extract step with Kestra taskCache, then join transactions and a product catalog in DuckDB to compute profit per transaction.
Re-downloading a large, slow-changing dataset on every pipeline run wastes compute and hammers the source system. This blueprint shows how Kestra's taskCache property caches the output of an expensive extract task for a configurable TTL, so a 200k-row product catalog is fetched only once per day while fast-moving transaction data stays fresh. The cached catalog is then joined with new transactions in DuckDB to calculate profit per transaction, giving you a lean, repeatable ETL pattern that keeps downstream joins fast and the upstream database calm.
transactions task (io.kestra.plugin.core.http.Download) downloads recent transaction data on every run, uncached, so the freshest sales records are always used.products task (io.kestra.plugin.core.http.Download) downloads the full product catalog and caches its output with taskCache set to enabled: true and ttl: PT24H. Within that 24-hour window Kestra reuses the cached result instead of re-downloading.duckdb task (io.kestra.plugin.jdbc.duckdb.Query) loads both files via inputFiles, runs a SQL JOIN on product_id with read_csv_auto, computes (sale_price - cost_price) * quantity AS profit, and stores the result with fetchType: STORE.DuckDB is an analytical engine, not a scheduler: it cannot decide when to run, when to skip redundant work, or how to recover from a failed extract. Kestra adds event and schedule triggers, declarative YAML you can version control, automatic retries, and full execution lineage across tasks. The taskCache property is the specific gap DuckDB cannot fill on its own: orchestration-level memoization that reuses an expensive task's output across runs based on a TTL, so you control freshness and cost from one place.
This flow uses public dataset URLs and references no secret() values. To point it at a private source, add credentials as Kestra secrets and reference them with {{ secret('NAME') }}.
products task is served from cache.duckdb task output to inspect the joined, profit-enriched result.ttl (for example PT1H or P1D) to match how often your reference data changes.Download tasks for database or object-storage extracts against your real sources.Schedule trigger to run the pipeline on a cadence.