dbt/include/maxcompute/macros/utils/date_spine.sql [33:68]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {# call as follows:

    date_spine(
        "day",
        "to_date('01/01/2016', 'mm/dd/yyyy')",
        "dbt.dateadd(week, 1, current_date)"
    ) #}


    with rawdata as (

        {{dbt.generate_series(
            dbt.get_intervals_between(start_date, end_date, datepart)
        )}}

    ),

    all_periods as (

        select (
            {{
                dbt.dateadd(
                    datepart,
                    "row_number() over (order by 1) - 1",
                    start_date
                )
            }}
        ) as date_{{datepart}}
        from rawdata

    ),

    filtered as (

        select *
        from all_periods
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



dbt/include/maxcompute/macros/utils/date_spine.sql [80:115]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {# call as follows:

    date_spine(
        "day",
        "to_date('01/01/2016', 'mm/dd/yyyy')",
        "dbt.dateadd(week, 1, current_date)"
    ) #}


    with rawdata as (

        {{dbt.generate_series(
            dbt.get_intervals_between(start_date, end_date, datepart)
        )}}

    ),

    all_periods as (

        select (
            {{
                dbt.dateadd(
                    datepart,
                    "row_number() over (order by 1) - 1",
                    start_date
                )
            }}
        ) as date_{{datepart}}
        from rawdata

    ),

    filtered as (

        select *
        from all_periods
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



