New to Kestra?
Use blueprints to kickstart your first workflows.
Use Kestra to create and query a SQLite table, then export the results to CSV and Excel files that business stakeholders can open and analyze.
Turn raw operational data into shareable business reports with a SQLite-backed workflow. This blueprint creates a SQLite table, populates it, queries the rows, and exports the result set as both CSV and Excel files, so analysts and business stakeholders can open the data in the tools they already use. It is a practical getting started example for data preparation, reporting, and lightweight ETL with Kestra.
working_directory task (io.kestra.plugin.core.flow.WorkingDirectory) provides a clean, isolated working directory so downstream tasks share files reliably within the execution.query task (io.kestra.plugin.jdbc.sqlite.Queries) connects to a SQLite database at jdbc:sqlite:kestra.db, creates the features table if it does not exist, clears it, inserts the feature rows, and runs a SELECT ordered by release_version. With fetchType: STORE, the result set is stored in Kestra internal storage and exposed as a downloadable file URI.to_csv task (io.kestra.plugin.serdes.csv.IonToCsv) reads the stored query output ({{ outputs.query.outputs[0].uri }}) and converts it to a CSV file.to_excel task (io.kestra.plugin.serdes.excel.IonToExcel) converts the same query output into an Excel spreadsheet.SQLite has no built-in scheduler, retry logic, or way to fan a query result out to multiple file formats. Kestra wraps the whole sequence in declarative YAML: add triggers to run on a schedule or in response to events, attach retries to handle transient failures, and rely on full execution lineage so every run, input, and output file is logged and downloadable. The serialization tasks turn one query into multiple consumable formats without any glue code, something the database engine alone cannot do.
This flow references no secrets. All connection details are embedded in the SQLite JDBC URL, so it runs as-is with no credential configuration.
query task output to review the ordered feature rows.to_csv and to_excel from the execution outputs.query task at a production database (Postgres, MySQL, or another JDBC source) by swapping the plugin type and url.features data with your own SQL to report on real business entities.triggers block to refresh the export on a Schedule or in response to upstream events.