Athena

Run a config-driven pipeline (source → transform → sink)

Executes a pipeline with optional prebuilt reference and overrides. `source.client` and `sink.client` override the Postgres/Supabase pool per step; when omitted, `X-Athena-Client` is used. Optional column aliasing and `dry_run` are supported. When gateway API keys are enforced, the key is validated against `X-Athena-Client`; step client overrides still route fetch/insert to other registered clients if specified. Successful runs emit three rows to `pipeline_step_log` on the configured logging database (`gateway.logging_client`), correlatable via `pipeline_run_id` in the response.

POST
/pipelines

Header Parameters

X-Athena-Client*string

Request Body

application/json

pipeline?string

Prebuilt pipeline name from config/pipelines.yaml

source?
transform?
sink?
dry_run?boolean

When true, fetch+transform runs but sink inserts are skipped.

Response Body

application/json

curl -X POST "https://athena-cluster.com/pipelines" \  -H "X-Athena-Client: string" \  -H "Content-Type: application/json" \  -d '{    "source": {      "table_name": "http_request_log",      "columns": [        "client_name",        "created_at",        "status_code"      ],      "limit": 100    },    "transform": {      "group_by": "client_name",      "aggregation_column": "status_code",      "aggregation_strategy": "cumulative_sum"    },    "sink": {      "table_name": "gateway_rollups"    },    "dry_run": true  }'
{
  "data": [],
  "rows_fetched": 100,
  "rows_inserted": 0,
  "would_insert": 12,
  "dry_run": true,
  "source_client": "athena_logging",
  "sink_client": "athena_logging",
  "errors": [],
  "pipeline_run_id": "0a9b5f6f-8a6c-4ba8-b41a-4a12ec2f5cb7"
}
Empty
Empty