Skip to content

Commit

Permalink
Check if 'column_size' is defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
elongl committed Oct 8, 2023
1 parent 1e25c6f commit e097878
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion macros/utils/graph/get_compiled_code.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{% macro get_compiled_code(node, as_column_value=false) %}
{% set compiled_code = adapter.dispatch("get_compiled_code", "elementary")(node) %}

{% if as_column_value and compiled_code | length > elementary.get_column_size() %}
{% set max_column_size = elementary.get_column_size() %}
{% if as_column_value and max_column_size and compiled_code | length > max_column_size %}
{% do return(elementary.get_compiled_code_too_long_err_msg()) %}
{% endif %}

Expand Down

0 comments on commit e097878

Please sign in to comment.