-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use getdate instead of current_timestamp #171
Conversation
@@ -3,7 +3,7 @@ | |||
{% endmacro %} | |||
|
|||
{% macro default__current_timestamp() %} | |||
current_timestamp::{{dbt_utils.type_timestamp()}} | |||
getdate()::{{dbt_utils.type_timestamp()}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll want to preserve current_timestamp
in the default implementation, but you can totally provide a redshift-specific implementation similar to the bigquery one below. That could just look like:
{% macro redshift__current_timestamp() %}
getdate()::{{dbt_utils.type_timestamp()}}
{% endmacro %}
The default
implementation here is going to be used by other databases like Snowflake and Postgres which do not (AFAIK) support the getdate()
function.
Thanks for making this PR @tjengel! I just made a quick comment - once that's addressed I can kick off a CI build here :D |
@drewbanin I was starting to suspect I'd need to go that route. I found the sample profiles.yml file. What do I need to do to get that setup to run the tests locally? |
We have some (admittedly very light) docs for this over here: https://github.com/fishtown-analytics/dbt-utils/tree/master/integration_tests You'll want to configure a Once that's done, you can try running That sample profiles.yml file you're referencing (this one, right is used in CI builds - you won't actually want to put your credentials in there! Always keep your creds outside of git repos -- the Let me know if there's anything else I can help out with here |
This CI build failed because of an issue with the |
We're going to cut an 0.14.4 release of dbt which addresses this Snowflake issue - going to re-run this once that version is live. |
This pr fixes issue #109