Created
May 13, 2020 20:48
-
-
Save drewbanin/ef7101b63a3a2621dc036920a763f6f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Run with: dbt run-operation clone_prod_to_target --args 'from: analytics.analytics' | |
| */ | |
| {% macro clone_prod_to_target(from) %} | |
| {% set sql -%} | |
| create schema if not exists {{ target.database }}.{{ target.schema }} clone {{ from }}; | |
| {%- endset %} | |
| {% do run_query(sql) %} | |
| {% endmacro %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment