Hi, pretty new to Elementary, and getting blocked ...
# community-support
b
Hi, pretty new to Elementary, and getting blocked by this error when I run
edr report
:
Copy code
2024-01-15 14:16:51 — ERROR — Could not generate the report - Error: Failed to run dbt command.
Encountered an error while running operation: Compilation Error
  'None' has no attribute 'split'
  
  > in macro log_macro_results (macros/utils/log_macro_results.sql)
  > called by <Unknown>
Please reach out to our community for help with this issue.
If anyone has any ideas I’m all ears! Looks like
<my-project>/dbt_packages/elementary/macros/utils/log_macro_results.sql
is failing on line 5:
Copy code
{% macro log_macro_results(macro_name, macro_args=none) %}
    {% if macro_args is none %}
        {% set macro_args = {} %}
    {% endif %}
    {%- set package_and_macro_name = macro_name.split('.') %} <- HERE
    {%- if package_and_macro_name | length == 1 %}
        {% set macro = context[macro_name] %}
    {%- elif package_and_macro_name | length == 2 %}
        {%- set package_name, macro_name = package_and_macro_name %}
        {% set macro = context[package_name][macro_name] %}
    {%- else %}
        {% do exceptions.raise_compiler_error("Received invalid macro name: {}".format(macro_name)) %}
    {% endif %}
    {% set results = macro(**macro_args) %}
    {% if results is not none %}
        {% do elementary.edr_log(tojson(results)) %}
    {% endif %}
{% endmacro %}
e
Hi @Ben Morris, thanks for raising the issue. Care to share your
edr.log
with me in private?
b
Sure thing, just sent to you, thanks for picking this up so quickly!
e
Hi Ben, just wanted to let you know that I didn't forget and I'm looking at your issue. Apologies for the inconvenience.
b
That’s ok! Really appreciate the support.
e
Do you use
dimension_anomalies
test?
b
I do yes
e
Can you run the following query and see if any of the
result_row
are missing a key called
dimension
?
Copy code
select etr.id, trr.result_row, trr.created_at from <ELEMENTARY_SCHEMA>.elementary_test_results etr 
join <ELEMENTARY_SCHEMA>.test_result_rows trr on etr.id = trr.elementary_test_results_id
where etr.test_sub_type = 'dimension'
order by trr.created_at desc
limit 10
b
Ran this an 0 results. Strange as if I look in the etr table I can see dimension in the test_sub_type column
e
What's the
status
? Are they all
pass
?
b
warn
for the most recent ones and
pass
for older ones
It’s a super odd bug. What I’ll try today is re-cloning from a known good state and re-applying my changes
So, I nuked my local repo and re-applied my changes and it now works… This is a really strange bug!
🔥 1