Created
June 11, 2018 13:54
-
-
Save mattm/dbf1599897fe1045631e2f4af55f943e to your computer and use it in GitHub Desktop.
dbt source macro
This file contains 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
{% macro source(table_name) %} | |
{% if target.name == 'prod' %} | |
{{ return("preceden_heroku." ~ table_name) }} | |
{% else %} | |
{{ return(table_name) }} | |
{% endif %} | |
{% endmacro %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment