Hello, Im testing with Materialized Views and I ran the following query:
create materialized view `xx`.`xx`.`stg_sales`
PARTITIONED BY (id, external_id, tenant_id)
TBLPROPERTIES ('cluster_by' = 'id') as
with stg_accounts_events as (
select
*
from
`xx`.`xx`.`snapshot_account_events`
),
cast_columns as (
select
id,
external_id,
tenant_id
from
stg_accounts_events
)
select
*
from
cast_columns
This query was 'redacted' and it was a very heavy query on its real context. We have query max timeout set to 10 minutes and this query took longer than 10 minutes it did timeout.
The only log I had was that the query timed out.
With all that said, a materialized view was created with a name __staging__acounts_{some hash id}__ which I did not create, im assuming its some 'behind the scenes' resource created by databricks. Also a DLT job was created and occurred in costs for some days.
Im aware the DLT is how MVs gets refreshed behind the scenes, the issue here was that my query did not work and my MV was not created, however the managed databricks resources were created and I had no way of knowing this without querying system tables and finding MVs that I did not purposely created.
Is this a bug? if not and this is the expected behaviour, is this documented somewhere making clear that I have to cleanup resources created by databricks myself when my query do not work?
Thank you!