trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.44k stars 3.01k forks source link

Support `select * exclude(list, of, columns) ...` and `select * replace(a as b, ...) ...` like BigQuery, DuckDB, Snowflake #23532

Closed neilmcguigan closed 1 month ago

neilmcguigan commented 1 month ago

data warehouses tend to have lots of columns! so it'd be handy to select all except a few...

BigQuery: https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#select_list

Snowflake: https://docs.snowflake.com/en/sql-reference/sql/select

DuckDB: https://duckdb.org/docs/sql/query_syntax/select.html

ebyhr commented 1 month ago

You can use exclude_columns table function: https://trino.io/docs/current/functions/table.html#exclude-columns-table-function