Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@

{% set columns = adapter.get_columns_in_relation(model_relation) %}

{% if not columns %}
{% set no_columns_error -%}
Failed to detect columns for {{ model_relation }}. Ensure it exists and authorized.
{%- endset %}
exceptions.raise_compiler_error(no_columns_error)
{% endif %}

with table_info as (
select
{{ elementary.edr_cast_as_string(elementary.edr_quote(full_table_name)) }} as full_table_name,
Expand Down Expand Up @@ -91,4 +98,4 @@
{{ elementary.edr_cast_as_timestamp('detected_at') }} as detected_at
from columns_snapshot_with_id

{%- endmacro %}
{%- endmacro %}