Skip to content

ADR-0005 — pinky export: queries/ auto-resolved output path

Status: accepted Date: 2026-05-31

Context

Most SQL files follow the queries/<db>/<query_name>/query.sql directory convention. The xlsx output path should be derived automatically so the user doesn't have to specify it every time.

Decision

When the SQL file matches the queries/<db>/<query_name>/query.sql pattern, the output is auto-resolved to:

queries/<db>/<query_name>/sended_files/YYYYMMDD_<query_name>.xlsx

sended_files/ is created if it doesn't exist. Fallback when outside the convention: current directory + SQL basename + date. Always overridable via --output.

Consequences

Zero-config for the common case. The convention is opt-in by directory structure — no config file required. sended_files/ should be added to .gitignore.