Browse Source

Add 'macros/get_backup_table_command.sql'

master
ganesh 4 years ago
parent
commit
664ac88b0f
1 changed files with 13 additions and 0 deletions
  1. 13
      macros/get_backup_table_command.sql

13
macros/get_backup_table_command.sql

@ -0,0 +1,13 @@
{% macro get_backup_table_command(table, day_of_month) %}
{% set backup_key -%}
day_{{ day_of_month }}/{{ table.database.lower() }}/{{ table.schema.lower() }}/{{ table.name.lower() }}/data_
{%- endset %}
copy into @s3://awsnowflakedata/adventureworks.public.backup_stage/{{ backup_key }}
from {{ table.database }}.{{ table.schema }}."{{ table.name.upper() }}"
header = true
overwrite = true
max_file_size = 1073741824;
{% endmacro %}
Loading…
Cancel
Save