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

[ADAP-693] No materialization 'materialized_view' was found for adapter bigquery! (searched types 'default' and 'bigquery') #818

Closed
2 tasks done
ahenaor opened this issue Jul 12, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@ahenaor
Copy link

ahenaor commented Jul 12, 2023

Is this a new bug in dbt-bigquery?

  • I believe this is a new bug in dbt-bigquery
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

My problem is relatively simple but I can't find a solution in the dbt documentation and in forum searches.

I try to create a materialized view in bigquery from my dbt project and get the following error message when trying to run the model:

dbt run --models raw_data.base.clientes
04:57:40 Running with dbt=1.5.2
04:57:41 Registered adapter: bigquery=1.5.3
04:57:41 Unable to do partial parsing because profile has changed
04:57:42 Found 5 models, 4 tests, 0 snapshots, 0 analyses, 362 macros, 0 operations, 0 seed files, 2 sources, 0 exposures, 0 metrics, 0 groups
04:57:42
04:57:45 Concurrency: 4 threads (target='dev')
04:57:45
04:57:45 1 of 1 START sql materialized_view model dbt.clientes .......................... [RUN]
04:57:45 1 of 1 ERROR creating sql materialized_view model dbt.clientes ................. [ERROR in 0.02s]
04:57:45
04:57:45 Finished running 1 materialized_view model in 0 hours 0 minutes and 3.53 seconds (3.53s).
04:57:45
04:57:45 Completed with 1 error and 0 warnings:
04:57:45
04:57:45 Compilation Error in model clientes (models/raw_data/base/clientes.sql)
04:57:45 No materialization 'materialized_view' was found for adapter bigquery! (searched types 'default' and 'bigquery')
04:57:45
04:57:45 Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1

This is my model and its configuration:

`
{{
config(
materialized = 'materialized_view',
auto_refresh = true,
on_configuration_change = "apply",
alias="clientes",
schema="data_outputs",
persist_docs={"relation": true, "columns": true},
)
}}

SELECT id, identificacion, ciudad, correo, telefono
FROM {{ ref("historico_clientes") }}
QUALIFY ROW_NUMBER() OVER(PARTITION BY identificacion ORDER BY ts_store_procedure DESC) = 1
`

Expected Behavior

The expected behavior is that my model is created as materialized view in bigquery

Steps To Reproduce

dbt run --models raw_data.base.clientes

Relevant log output

No response

Environment

- OS: Ubuntu 18.04
- Python: Python 3.11.3
- dbt-core:1.5.3
- dbt-bigquery:1.5.3

Additional Context

None

@ahenaor ahenaor added bug Something isn't working triage labels Jul 12, 2023
@github-actions github-actions bot changed the title No materialization 'materialized_view' was found for adapter bigquery! (searched types 'default' and 'bigquery') [ADAP-693] No materialization 'materialized_view' was found for adapter bigquery! (searched types 'default' and 'bigquery') Jul 12, 2023
@jd175
Copy link

jd175 commented Jul 13, 2023

+1, also experiencing this issue in DBT Cloud.

06:32:16 Began running node model.staging.stg_event__utms
06:32:16 2 of 2 START sql materialized_view model dbt_dev.stg_rudderstack__pages_utms ... [RUN]
06:32:16 Acquiring new bigquery connection 'model.staging.stg_event__utms'
06:32:16 Began compiling node model.staging.stg_event__utms
06:32:16 Writing injected SQL for node "model.staging.stg_event__utms"
06:32:16 Timing info for model.staging.stg_event__utms (compile): 06:32:16.194638 => 06:32:16.220287
06:32:16 Began executing node model.staging.stg_event__utms
06:32:16 Timing info for model.staging.stg_event__utms (execute): 06:32:16.221322 => 06:32:16.223175
06:32:16 Compilation Error in model stg_rudderstack__pages_utms (models/staging/rudderstack/stg_rudderstack__pages_utms.sql)
No materialization 'materialized_view' was found for adapter bigquery! (searched types 'default' and 'bigquery')

@dataders
Copy link
Contributor

@ahenaor @jd175 is this something that has worked for you before? as far as I know, materialized views are not supported in dbt-bigquery today. However we hope to support them in the very near future! See #672

@ahenaor
Copy link
Author

ahenaor commented Jul 14, 2023

@ahenaor @jd175 is this something that has worked for you before? as far as I know, materialized views are not supported in dbt-bigquery today. However we hope to support them in the very near future! See #672

In the DBT documentation. In the section Bigquery Configurations LINK: https://docs.getdbt.com/reference/resource-configs/bigquery-configs#materialized-view

They indicate that Bigquery supports materialized views and indicate how to configure this materialization.

I followed the indications and later the output is the error that I write here.

I'm surprised then that you tell me that DBT and the BigQuery connector really don't support materialized views.

@jd175
Copy link

jd175 commented Jul 16, 2023

@ahenaor @jd175 is this something that has worked for you before? as far as I know, materialized views are not supported in dbt-bigquery today. However we hope to support them in the very near future! See #672

I had the same experience as @ahenaor - I was setting up a new model and following the BigQuery config guide. Is the guide incorrect?

@dataders
Copy link
Contributor

@ahenaor @jd175. I'm sorry! this was our bad. we are tracking to have materialized views shipped as part of dbt-core 1.6.0, which is currently in beta and planned for release in a few weeks.

Our docs team added the functionality added the new feature, but missed adding the code to have it only show up when 1.6.0 is chosen from the version dropdown. This was fixed in 'dbt-labs/docs.getdbt.com#3750

I can say that MVs are coming to dbt-bigquery, and I'll reach out to both of you when they're (closer) to ready!

@vishalb5000845
Copy link

Hello,
Is this issue fixed? If fixed what is the stable version of dbt-core and dbt-bigquery adapter i can use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants