Custom materialization - Run DDL on snowflake -- Error

Hi there,

I wanted to run DDL statements on snowflake and so wanted to use the custom materialization.

I tried creating a macro (persistent_table) similar to this one below

dbt_hacks/persistent_table_materialization.sql at master · venkatra/dbt_hacks · GitHub

and run the below model

{{ config(materialized=’persistent_table’ ,retain_previous_version_flg=false ,migrate_data_over_flg=true )}}
CREATE OR REPLACE TABLE “{{ database }}”.”{{ schema }}”.”CONTACT” (
FIRST_NAME VARCHAR(100),
LAST_NAME VARCHAR(100),
EMAIL VARCHAR(100),
STREETADDRESS VARCHAR(100),
CITY VARCHAR(100)
);

I get an error , can you please let me know what i am missing? Thank you in advance!!

No materialization ‘persistent_table’ was found for adapter snowflake! (searched types ‘default’ and ‘snowflake’)

Thank you!!

Sara

I was able to get this to work, it was just missing more macro files. The error was due to the macro files were not having .sql extension (my bad). I was able to create DDL defined in the model in snowflake.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.