Usage
Signature
Parameters
The SQL query to execute.
Whether to display the result in the UI.
Optional SQL engine to use. Can be a SQLAlchemy, DuckDB, Clickhouse, Redshift, Ibis, or DB-API 2.0 compatible connection (including ADBC drivers). If
None, uses DuckDB.Returns
Any
The result of the query.
Supported Engines
- DuckDB (default): Automatically uses DuckDB if no engine is specified
- SQLAlchemy: Pass a SQLAlchemy engine or connection
- Ibis: Pass an Ibis connection
- Clickhouse: Pass a Clickhouse connection
- Redshift: Pass a Redshift connection
- DB-API 2.0: Any PEP 249 compatible connection
- ADBC: DB-API wrappers provided by ADBC drivers
Default Result Limit
You can set a default result limit using theMARIMO_SQL_DEFAULT_LIMIT environment variable. If set, queries without an explicit LIMIT clause will be limited to this many rows.