You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So we can utilize that as the base implementation and adapters can customize as-needed.
Utility
This function is also generally useful anytime someone wants to generate SQL to create an scalar DATE value by supplying an explicit year, month, day combo.
An expected use is supplying a start and end date to dbt.date_spine.
For example, #8825 describes how we'd like to automatically create a metricflow_time_spine model if the project defines any semantic objects, and that relies upon being able to do a cross-database dbt.date_spine given an explicit start and end date.
The content you are editing has changed. Please copy your edits and refresh the page.
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.
This epic comprises the changes across dbt Labs repos necessary to implement a cross-database
date
macro as described in dbt-labs/dbt-adapters#192.Implementation
There is no equivalent function specified in ISO/IEC 9075 (the SQL standard), so there is not a natural adapter-agnostic implementation from them.
However, many database vendors support a
to_date
function with syntax similar to the following:So we can utilize that as the base implementation and adapters can customize as-needed.
Utility
This function is also generally useful anytime someone wants to generate SQL to create an scalar
DATE
value by supplying an explicit year, month, day combo.An expected use is supplying a start and end date to
dbt.date_spine
.For example, #8825 describes how we'd like to automatically create a
metricflow_time_spine
model if the project defines any semantic objects, and that relies upon being able to do a cross-databasedbt.date_spine
given an explicit start and end date.dbt-adapters
date
macro dbt-adapters#192date
macro dbt-adapters#191dbt-postgres
date
macro dbt-postgres#82date
macro dbt-postgres#81dbt-redshift
date
macro dbt-redshift#808date
macro dbt-redshift#806dbt-snowflake
date
macro dbt-snowflake#1013date
macro dbt-snowflake#1011dbt-bigquery
date
macro dbt-bigquery#1221date
macro dbt-bigquery#1219dbt-spark
date
macro dbt-spark#1031date
macro dbt-spark#1030Documentation
date
macro docs.getdbt.com#5427The text was updated successfully, but these errors were encountered: