Templates
When you click + New pipeline, you choose a template. A template is a bundle of files that get copied under pipelines/<slug>/ in S3.
Built-in templates
Blank
The simplest possible config: no source containers, no mappings, no analytic tables, no dashboards. Useful when you want to assemble everything yourself in the graph editor.
Spending Tracker
A worked example covering the full feature set:
- Source container
transactions_rawreads CSVs frompipelines/<slug>/raw/transactions/with columnsdate, description, amount, account. - Lookup mapping
categoriestags each row by keyword-substring match against the description (e.g.STARBUCKS → FOOD,UBER → TRANSPORT). - Mapping
transactions_mappingparses the date, normalizes the description to upper-case, castsamounttofloat64, and joins the category lookup. - Analytic table
transactionswrites month-partitioned Parquet topipelines/<slug>/clean/transactions/year=YYYY/month=MM/data.parquet. - Dashboard
Spending Overviewships with three KPI tiles (Total Spending in CAD, Transactions count, Top Category), a category doughnut, a monthly-trend line, a top-merchants horizontal bar, and a paginated transactions table.
Adding your own template
Templates live in src/karet/lib/templates/index.ts. To add one:
- Define a
PipelineConfigvalue with your source containers, mappings, and analytic tables. - Optionally define a
DashboardConfigto ship alongside. - Add an entry to the
TEMPLATESmap keyed by yourTemplateId.
ts
// lib/templates/index.ts
export type TemplateId = "blank" | "spending" | "your_id";
export const TEMPLATES: Record<TemplateId, Template> = {
// …
your_id: {
id: "your_id",
name: "Your template",
description: "What this provisions.",
files: {
"pipeline.json": yourPipeline,
"dashboards/your_dashboard.json": yourDashboard,
},
rawFiles: {
// optional plain-text seed data, e.g. a sample CSV.
"raw/your_table/sample.csv": "col1,col2\n…",
},
},
};The home-page + New pipeline modal picks templates up automatically from this map.