brockb
Databricks Employee
Databricks Employee

Hi,

It's possible that the `identifier` clause is what you're looking for (https://docs.databricks.com/en/sql/language-manual/sql-ref-names-identifier-clause.html#identifier-c...). If so, this basic example should work:

DECLARE mytab = '`mycatalog`.`myschema`.t1';
DECLARE mytab_suffix = 'suffix';
CREATE TABLE IF NOT EXISTS IDENTIFIER(mytab || '_' || mytab_suffix) (c1 int);
SELECT * FROM IDENTIFIER(mytab || '_' || mytab_suffix);

Hope it helps.