Databricks SQL - Conditional Catalog query

102842
New Contributor II

Hi is there a way we can do

%sql
select * from {{ catalog }}.schema.table

Where `{{ catalog }}` is a template variable extracted/evaluated from either an environment variable, a databricks secret, or somewhere else? (note: not a widget)