I am facing the below error:
`2020-07-03 20:46:06.208650 (Thread-1): Writing injected SQL for node "model.dbt_from_scratch.reusable_type1_load"`
`2020-07-03 20:46:06.209600 (Thread-1): finished collecting timing info`
`2020-07-03 20:46:06.233872 (Thread-1): Unique Key is : None`
`2020-07-03 20:46:06.234081 (Thread-1): Date Column Name is : as_of_dt`
`2020-07-03 20:46:06.234191 (Thread-1): Target_Table_name is : TRUNC_AND_LOAD`
`2020-07-03 20:46:06.234290 (Thread-1): Source_Table_name is : CUSTOMER_TOTAL_ORDERS`
`2020-07-03 20:46:06.234381 (Thread-1): Identifier is : reusable_type1_load`
`2020-07-03 20:46:06.234742 (Thread-1): Current Relation type/status : True`
`2020-07-03 20:46:06.234873 (Thread-1): Current Relation is : "ANALYTICS_DB"."DBT"."TRUNC_AND_LOAD"`
`2020-07-03 20:46:06.259531 (Thread-1): Using snowflake connection "model.dbt_from_scratch.reusable_type1_load".`
`2020-07-03 20:46:06.259802 (Thread-1): On model.dbt_from_scratch.reusable_type1_load: /* {"app": "dbt", "dbt_version": "0.17.0", "profile_name": "dbt-snowflake-db", "target_name": "dev", "node_id": "model.dbt_from_scratch.reusable_type1_load"} */` ` describe table`
`2020-07-03 20:46:06.377164 (Thread-1): Snowflake query id: 0195539e-0142-4ee9-001c-ef830003b0e6`
`2020-07-03 20:46:06.377339 (Thread-1): Snowflake error: 001003 (42000): SQL compilation error:`
`syntax error line 1 at position 14 unexpected '<EOF>'.`
`2020-07-03 20:46:06.377527 (Thread-1): Error running SQL: macro get_columns_in_relation`
`2020-07-03 20:46:06.377626 (Thread-1): Rolling back transaction.`
`2020-07-03 20:46:06.377789 (Thread-1): finished collecting timing info`
`2020-07-03 20:46:06.378283 (Thread-1): Database Error in model reusable_type1_load (models/type1_load/reusable_type1_load.sql)`
` 001003 (42000): SQL compilation error:`
Materialization Code:
{% materialization type1_elt_load, adapter='snowflake' %}
{% set unique_key = config.get('unique_key') %}
{%- set date_col = config.get('date_col_name',default='as_of_dt') -%}
{%- set target_table_name = config.get('target_table_name') -%}
{%- set source_table_name = config.get('source_table_name') -%}
{%- set trunc_load_flag = config.get('trunc_load_flag',default='false') -%}
{%- set scd_type1_flag = config.get('scd_type1_flag',default='false') -%}
{%- set del_insert_flag = config.get('del_insert_flag',default='false') -%}
{%- set identifier = model['alias'] -%}
--
{{ log("Unique Key is : " ~ unique_key) }}
{{ log("Date Column Name is : " ~ date_col) }}
{{ log("Target_Table_name is : " ~ target_table_name) }}
{{ log("Source_Table_name is : " ~ source_table_name) }}
{{ log("Identifier is : " ~ identifier) }}
--
{%- set current_relation = adapter.get_relation(database=database, schema=schema, identifier=target_table_name) -%}
--
{%- set current_relation_exists_as_table = (current_relation is not none and current_relation.is_table) -%}
{{ log("Current Relation type/status : " ~ current_relation_exists_as_table) }}
-- Raise exception if the table is missing
{% if not current_relation %}
{% do exceptions.warn("Unable to find the relation/table") %}
{% else %}
{{ log("Current Relation is : " ~ current_relation) }}
{% endif %}
-- setup
{{ run_hooks(pre_hooks, inside_transaction=False) }}
-- `BEGIN` happens here:
{{ run_hooks(pre_hooks, inside_transaction=True) }}
/*
-- Call for trunc and load
{% if trunc_load_flag %}
{% set build_sql = type1_del(target_table_name,source_table_name,date_col,trunc_load_flag) %}
{% endif %}
--
{{ log("Build SQL is : " ~ build_sql) }}
--
{% call statement("main") %}
{{ build_sql }}
{% endcall %}
*/
{{ run_hooks(post_hooks, inside_transaction=True) }}
-- `COMMIT` happens here
{% do adapter.commit() %}
{% for rel in to_drop %}
{% do adapter.drop_relation(rel) %}
{% endfor %}
{{ run_hooks(post_hooks, inside_transaction=False) }}
{{ return({'relations': [target_relation]}) }}
{% endmaterialization %}
Any help would be really appreciated. Thanks