Hi all,
I started implementing the approach illustrated in this post for BigQuery.
-- macros/udfs/file_name.sql
{% set schema = 'schema_name' %}
{% macro macro_name() %}
CREATE OR REPLACE FUNCTION {{target.schema}}.function_name(input STRING)
RETURNS
...
I was hoping the schema variable defined at the top could be passed into {{ target.schema}}
block, but it seem didn’t work as expected (no function created in my target schema).
Two questions here:
- How to set target schema for udf macro like how we did for model config?
- Does compiled macro go into somewhere like
target/
?