aws-samples / aws-samples/dbt-glue

View materialization support

Open
#654 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
147
Forks
96
Avg merge
7h 4m
Merged PRs (30d)
5

Description

### Describe the feature
Add support to view materialization in dbt-glue adapter.
https://docs.getdbt.com/docs/build/materializations#view

### Additional context
When running a model in dbt-glue with materialized='view', regardless of the file_format chosen, I get:
```
20:29:52 Database Error in model glue_sql_model_view_1 (models/features_tests/sql_models/glue_sql_model_view_1.sql)
Glue cursor returned `error` for statement None for code SqlWrapper2.execute('''/* {"app": "dbt", "dbt_version": "1.10.15", "profile_name": "poc_dbt", "target_name": "glue_modeling", "node_id": "model.poc_dbt.glue_sql_model_view_1"} */
create or replace view feature_tests_db.glue_sql_model_view_1
as



SELECT
*
FROM bronze_scenario_1.glue_src_entity_patients

''', use_arrow=False, location='s3://cohere-processed-dataplatform/scenario_1'), UnsupportedOperationException: Replacing a view is not supported by catalog: glue_catalog
compiled code at target/run/poc_dbt/models/features_tests/sql_models/glue_sql_model_view_1.sql
```

### Who will this benefit?
Everyone that wants to materialize models as views.

### Are you interested in contributing this feature?
Let us know if you want to write some code, and how we can help.

Contributor guide

Open the contributing guide

Research direction

Start with models/features_tests/sql_models/glue_sql_model_view_1.sql and the compiled SQL under target/run shown in the report. Compare the dbt-glue adapter's existing materialization entry points and tests, then verify that a model using materialized='view' succeeds for the relevant file formats without the reported catalog error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.