From 6d5a815f7989c26f95db49dc51a33d041d0b2895 Mon Sep 17 00:00:00 2001 From: Sara Burns Date: Tue, 8 Oct 2024 15:39:24 -0400 Subject: [PATCH 1/2] fix: use event_sink tables --- models/tags/most_recent_course_tags.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/models/tags/most_recent_course_tags.sql b/models/tags/most_recent_course_tags.sql index b0c5363f..0cd01091 100644 --- a/models/tags/most_recent_course_tags.sql +++ b/models/tags/most_recent_course_tags.sql @@ -27,5 +27,7 @@ with ) select course_key, course_name, tag_id, value as tag, lineage, mrt.name as taxonomy_name from parsed_tags -inner join {{ ref("most_recent_tags") }} mrot FINAL on mrot.id = tag_id -inner join {{ ref("most_recent_taxonomies") }} mrt FINAL on mrt.id = mrot.taxonomy +inner join {{ source("event_sink", "most_recent_tags") }} mrot FINAL on mrot.id = tag_id +inner join + {{ source("event_sink", "most_recent_taxonomies") }} mrt FINAL + on mrt.id = mrot.taxonomy From dd15d1e097ec134c20b9f5f379a278c9f20e6fc6 Mon Sep 17 00:00:00 2001 From: Sara Burns Date: Tue, 8 Oct 2024 16:01:58 -0400 Subject: [PATCH 2/2] fix: remove event_sink schema --- models/tags/most_recent_course_tags.sql | 6 ++---- models/tags/most_recent_object_tags.sql | 1 - models/tags/most_recent_tags.sql | 1 - models/tags/most_recent_taxonomies.sql | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/models/tags/most_recent_course_tags.sql b/models/tags/most_recent_course_tags.sql index 0cd01091..b0c5363f 100644 --- a/models/tags/most_recent_course_tags.sql +++ b/models/tags/most_recent_course_tags.sql @@ -27,7 +27,5 @@ with ) select course_key, course_name, tag_id, value as tag, lineage, mrt.name as taxonomy_name from parsed_tags -inner join {{ source("event_sink", "most_recent_tags") }} mrot FINAL on mrot.id = tag_id -inner join - {{ source("event_sink", "most_recent_taxonomies") }} mrt FINAL - on mrt.id = mrot.taxonomy +inner join {{ ref("most_recent_tags") }} mrot FINAL on mrot.id = tag_id +inner join {{ ref("most_recent_taxonomies") }} mrt FINAL on mrt.id = mrot.taxonomy diff --git a/models/tags/most_recent_object_tags.sql b/models/tags/most_recent_object_tags.sql index 0884d25c..fbd4fa9e 100644 --- a/models/tags/most_recent_object_tags.sql +++ b/models/tags/most_recent_object_tags.sql @@ -1,7 +1,6 @@ {{ config( materialized="materialized_view", - schema=env_var("ASPECTS_EVENT_SINK_DATABASE", "event_sink"), engine=get_engine("ReplacingMergeTree()"), order_by="(id)", post_hook="OPTIMIZE TABLE {{ this }} {{ on_cluster() }} FINAL", diff --git a/models/tags/most_recent_tags.sql b/models/tags/most_recent_tags.sql index 909cdb1f..f1dafb9f 100644 --- a/models/tags/most_recent_tags.sql +++ b/models/tags/most_recent_tags.sql @@ -1,7 +1,6 @@ {{ config( materialized="materialized_view", - schema=env_var("ASPECTS_EVENT_SINK_DATABASE", "event_sink"), engine=get_engine("ReplacingMergeTree()"), order_by="(id)", post_hook="OPTIMIZE TABLE {{ this }} {{ on_cluster() }} FINAL", diff --git a/models/tags/most_recent_taxonomies.sql b/models/tags/most_recent_taxonomies.sql index 6a12a2a0..0b9a0b4a 100644 --- a/models/tags/most_recent_taxonomies.sql +++ b/models/tags/most_recent_taxonomies.sql @@ -1,7 +1,6 @@ {{ config( materialized="materialized_view", - schema=env_var("ASPECTS_EVENT_SINK_DATABASE", "event_sink"), engine=get_engine("ReplacingMergeTree()"), order_by="(id)", post_hook="OPTIMIZE TABLE {{ this }} {{ on_cluster() }} FINAL",