Skip to content
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

get_date_dimension not working #74

Closed
hammadhasandogar opened this issue Nov 25, 2021 · 2 comments
Closed

get_date_dimension not working #74

hammadhasandogar opened this issue Nov 25, 2021 · 2 comments

Comments

@hammadhasandogar
Copy link

Seems like compiled query generates nested CET expression, which causes the failure.

{{ dbt_date.get_date_dimension('2000-01-01', '2050-12-31') }}
Incorrect syntax near 'with'.

with base_dates as (    
with date_spine as (...

package.yml

packages:
  - package: calogica/dbt_date
    version: 0.4.1
  - package: dbt-labs/dbt_utils
    version: 0.7.4
  - package: dbt-msft/tsql_utils
    version: 0.8.1

dispatch defined in dbt_project.yml

dispatch:
  - macro_namespace: dbt_utils
    search_order: ['tsql_utils', 'dbt_utils']
  - macro_namespace: dbt_date
    search_order: ['tsql_utils', 'dbt_date']
@hammadhasandogar
Copy link
Author

it was supported at once point, but the code base has evolved significantly since to include many nested CTEs, which aren't suported today in TSQL. Click here to upvote and get the feature supported!

@dataders dataders transferred this issue from microsoft/dbt-synapse Nov 29, 2021
@dataders
Copy link
Contributor

thanks @hammadhasandogar! I moved this to this repo, so it can be of more help in the future! If you'd like it'd be very helpful if you could make a quick pull request here that changes tells users that get_date_dimension isn't supported for TSQL adapters.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants