Skip to content

Commit

Permalink
Merge pull request #243 from jtmcn/aws_sns_support_on_snowflake
Browse files Browse the repository at this point in the history
Support aws_sns_topic property in Snowflake
  • Loading branch information
dataders authored Apr 11, 2024
2 parents c7ae743 + c91fc2f commit 38417dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions macros/plugins/snowflake/create_external_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
10 changes: 9 additions & 1 deletion sample_sources/snowflake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,12 @@ sources:
- name: id
description: this is an id
- name: name
description: and this is a name
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

0 comments on commit 38417dd

Please sign in to comment.