diff --git a/macros/plugins/snowflake/create_external_table.sql b/macros/plugins/snowflake/create_external_table.sql index 2839fbaa..bdfcd9f4 100644 --- a/macros/plugins/snowflake/create_external_table.sql +++ b/macros/plugins/snowflake/create_external_table.sql @@ -51,6 +51,9 @@ {% if external.auto_refresh in (true, false) -%} auto_refresh = {{external.auto_refresh}} {%- endif %} + {% if external.aws_sns_topic -%} + aws_sns_topic = '{{external.aws_sns_topic}}' + {%- endif %} {% if external.table_format | lower == "delta" %} refresh_on_create = false {% endif %} diff --git a/sample_sources/snowflake.yml b/sample_sources/snowflake.yml index 035f5335..59ecde22 100644 --- a/sample_sources/snowflake.yml +++ b/sample_sources/snowflake.yml @@ -84,4 +84,12 @@ sources: - name: id description: this is an id - name: name - description: and this is a name \ No newline at end of file + description: and this is a name + + - name: aws_sns_refresh_tbl + description: "External table using AWS SNS for auto-refresh" + external: + location: "@stage" # reference an existing external stage + file_format: "( type = csv )" + # auto_refresh is assumed, setting to false is not supported + aws_sns_topic: "arn:aws:sns:us-east-1:123456789012:my_topic" # SNS topic ARN \ No newline at end of file