Repository navigation
Replies: 1 comment
|
Yes, testing is its only use. The one caller is For a new adapter you don't have to define it. def timestamp_add_sql(self, add_to: str, number: int = 1, interval: str = "hour") -> str:
return f"{add_to} + interval '{number} {interval}'"Override it only if your database rejects |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
It seems to be redundant with defining a
<adapter>__dateaddmacro implementation, and I can't figure out why it's needed. (I'm working on a new dbt adapter and am trying to understand the purpose.)I did a Github code search to try to find references to
adapter.timestamp_add_sqland all I could find were implementations in nearly all adapters, andtestscode that references it. Is testing the sole purpose? Can we consolidate and try to use thedbt.dateaddmacro in testing instead of requiring adapters to define this method to generate SQL?All reactions