We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f92c3ac commit fa2737eCopy full SHA for fa2737e
macros/edr/data_monitoring/schema_changes/get_columns_snapshot_query.sql
@@ -14,6 +14,13 @@
14
15
{% set columns = adapter.get_columns_in_relation(model_relation) %}
16
17
+ {% if not columns %}
18
+ {% set no_columns_error -%}
19
+ Failed to detect columns for {{ model_relation }}. Ensure it exists and authorized.
20
+ {%- endset %}
21
+ exceptions.raise_compiler_error(no_columns_error)
22
+ {% endif %}
23
+
24
with table_info as (
25
select
26
{{ elementary.edr_cast_as_string(elementary.edr_quote(full_table_name)) }} as full_table_name,
@@ -91,4 +98,4 @@
91
98
{{ elementary.edr_cast_as_timestamp('detected_at') }} as detected_at
92
99
from columns_snapshot_with_id
93
100
94
-{%- endmacro %}
101
+{%- endmacro %}
0 commit comments