New to Kestra?
Use blueprints to kickstart your first workflows.
Chain a DuckDB query into a local Ollama model with Kestra. Metrics become a plain-English standup narrative, written on your own hardware every night.
Dashboards show numbers; standups need sentences. This blueprint chains the two halves in one execution: io.kestra.plugin.jdbc.duckdb.Query computes the day's metrics and stores the result set in internal storage, and io.kestra.plugin.ollama.cli.OllamaCLI reads that exact file and writes a three-sentence plain-English narrative, biggest improvement, biggest decline, on your own hardware. Discord points the team at the artifact before the morning standup, and no metric ever visits a cloud LLM.
daily_metrics (io.kestra.plugin.jdbc.duckdb.Query) runs against DuckDB's default in-memory database. The VALUES list is a stand-in; in real use the same SQL reads your warehouse file or attached storage. fetchType: STORE writes the full result set to internal storage and exposes it as {{ outputs.daily_metrics.uri }}.narrate (io.kestra.plugin.ollama.cli.OllamaCLI) maps that stored file into its working directory through inputFiles, inlines it into a narration prompt via $(cat metrics.ion), and redirects the model's answer to narrative.txt, which outputFiles uploads as an execution artifact.enableModelCaching: true persists the model between nightly runs, so narration starts immediately.notify posts a pointer to the artifact rather than interpolating model prose into JSON; the errors block covers both halves of the chain. A disabled-by-default Schedule trigger runs the chain at 06:30.The chain is the point: DuckDB does not schedule inference and Ollama does not run SQL. Kestra sequences them with typed file passing through internal storage, so the query result becomes the model's input file with one template expression, retries apply per task, and the execution history keeps the metrics, the narrative, and the notification together as one auditable unit per day.
containerImage runs Ollama inside Docker, so the Kestra worker needs access to a Docker daemon. On self-hosted workers that already have Ollama installed locally, set the task's taskRunner to Process to use the local install directly.DISCORD_WEBHOOK_URL: Discord incoming webhook URL.DISCORD_WEBHOOK_URL secret to your Kestra namespace.narrative.txt calls out signups up and orders down.VALUES list with SQL over your real tables and set disabled: false on the nightly trigger.