Hello ! I'm finally trying to use Elementary with ...
# community-support
a
Hello ! I'm finally trying to use Elementary with Trino and I have a small issue while running the initial
dbt run --select 'elementary'
because the underlying catalog (ie. database in the DBT world) I'm using doesn't support view creation. Is there a workaround for this?
Copy code
14:38:41  Finished running 15 incremental models, 1 table model, 12 view models, 2 hooks in 0 hours 1 minutes and 27.49 seconds (87.49s).
14:38:41  
14:38:41  Completed with 14 errors and 0 warnings:
14:38:41  
14:38:41    Database Error in model data_monitoring_metrics (models/edr/data_monitoring/data_monitoring/data_monitoring_metrics.sql)
  TrinoUserError(type=USER_ERROR, name=NOT_SUPPORTED, message="This connector does not support creating views", query_id=20240524_143722_03593_ggbwc)
@Tomme: maybe you have an idea?
t
Hey @Adrien Besnard, apologies the
dbt-trino
x Elementary was only tested and built on connectors that support the typical
merge
incremental materialization within
dbt-trino
. However, you can disable the use of views with
merge
within
dbt-trino
by using
+views_enabled: false
within your
dbt_project.yml
- likely under the
elementary
model configuration - ⚠️ I have not tried this before and may cause unexpected behaviour! Out of interest this is the Elementary related configuration I have been using:
Copy code
...

models:
  ...

  elementary:
    +on_table_exists: drop
    +database: REDACTED
    +schema: elementary
    # +views_enabled: false # try this at your own risk

vars:
  upload_artifacts_method: replace
If this does not work, I hope it does but I feel may cause bugs, you can always create an additional catalog within a connector that does support views and point
elementary
at that "database" for Elementary specific things.
a
To continue with my tests, that actually what I did using the Iceberg connector. But I'll try with the
+on_table_exists
and
+View_enabled
, thanks a lot!
By curiosity only, what are the connector you're using to store the Elementary data, then?
t
@Adrien Besnard I am using the Iceberg connector alongside AWS Glue for my data catalog, which support View creation. If you are using Hive x Iceberg catalog redirection ensure you are using the Iceberg connector directly and not via the Hive connector