Skip to content

Add support for reading SQL from file or stdin #3

@castengine

Description

@castengine

Goal

Allow the --select_sql argument to accept input from a file or standard input (stdin), making it easier to use complex queries without shell escaping.

Tasks

  • If --select_sql starts with @, treat the rest as a path to a .sql file and read its contents
    • Example: --select_sql @query.sql
  • If --select_sql is -, read SQL from stdin
  • Validate file existence and show error if file is not found
  • Update README with usage examples

Why it matters

Long SQL queries are difficult to pass inline. Supporting file and stdin input aligns with standard CLI practices and improves developer ergonomics.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions