Both SQLX and JavaScript now support a schema()
function, which returns the (suffixed, as applicable) name of "this" action's schema. (Contrived) examples:
publish("table", (ctx) => `select "${ctx.schema()}" as col1`);
config { type: "table" }
select "${schema()}" as col1
Assuming dataform.config
contains "defaultSchema": "foo"
, these both generate a table action whose SQL is select "foo" as col1
. This is likely most useful in type: "operations"
scripts.