github dataform-co/dataform 2.2.0
2.2.0: Add `schema()` function in SQL templating

latest releases: 3.0.8, 3.0.7, 3.0.4...
22 months ago

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.

Don't miss a new dataform release

NewReleases is sending notifications on new releases.