<@U088WCP3B4P> I’m running edr report in a databri...
# ask-elementary-ai
j
@kapa.ai I’m running edr report in a databricks dbt job, and i got an error saying “temp view too many name parts” for order_test_results_tmp. How can i fix it?
k
A message from kapa.ai
This error is related to how Spark/Databricks handles temporary views with schema names. Based on the knowledge sources, Spark cannot create temporary views with a schema name prefix, which is causing your error. The issue occurs because Elementary tries to create temporary views with a schema name, but Databricks doesn't allow database prefixes for temporary view names. This is a known issue with Elementary when running on Spark/Databricks environments. A community member encountered a similar issue and reported:
Copy code
When I run anomaly test I get the following error: It is not allowed to add database prefix `dbt_devxp_d_sharontk02` for the TEMPORARY view name.
[This Slack thread](https://slack.com/archives/C02CTC89LAX/p1690360303394909) discusses the solution, which was to create a custom macro to override the temporary view creation behavior. The fix was implemented in Elementary to handle this Spark-specific behavior. To resolve this issue, you should: 1. Make sure you're using the latest version of Elementary, as this issue has been fixed in newer versions 2. If you're still experiencing the issue with the latest version, you might need to override the
spark__make_temp_view_relation
macro in your project Another similar issue was reported in [this Slack thread](https://slack.com/archives/C02CTC89LAX/p1675261328664329) where a user encountered
Temporary view 'elementary_test_results__dbt_tmp' already exists
error when using a persistent Databricks cluster. If you're using a persistent cluster, you might also want to consider creating a new cluster for each job to avoid issues with temporary views from previous runs. Let me know if updating to the latest version resolves your issue or if you need more specific guidance on implementing the fix. I'm here to help you troubleshoot this Elementary Data issue further if needed. Note: The fix for this specific issue was implemented in [PR #452](https://github.com/elementary-data/dbt-data-reliability/pull/452) mentioned in the Slack thread.
j
@kapa.ai Is it causing “no test” in my repost html?
k
A message from kapa.ai
Yes, the temporary view issue you're experiencing could indeed be causing the "no test results" message with the flamingo image in your Elementary report HTML. This is a known issue that several users have encountered. Based on the knowledge sources, when Elementary fails to properly create or access temporary views during the report generation process, it can lead to empty reports. A community member described a similar situation: > "Strangely the html file generated started to present some errors, saying that there are no Tests set and showing the flamingo page." [Slack thread](https://slack.com/archives/C02CTC89LAX/p1684878781773919) Another user reported: > "I run
edr monitor report
on a docker container using Airflow, it kicks off after dbt tests finishes - Since I updated I'm getting an error which I'll paste the beginning of in the thread below. A report is published - but it doesn't contain any data, I just get the No test results Flamingo." [Slack thread](https://slack.com/archives/C02CTC89LAX/p1678963756105439) The temporary view errors in Databricks/Spark environments can prevent Elementary from properly collecting and processing test results, leading to an empty report even though your tests might be running successfully. To fix this issue: 1. Make sure you're using the latest version of Elementary 2. Run
dbt run -s elementary --full-refresh
to rebuild the Elementary schema 3. If the issue persists, you might need to check if there are any temporary tables left from previous runs that could be causing conflicts One user mentioned that dropping specific tables and views helped resolve their issue: > "The first issue was resolved by dropping _elementary_exposures_ table and _enriched_exposures_ view." [Slack thread](https://slack.com/archives/C02CTC89LAX/p1724547060206569) If you continue to experience issues, consider sharing your detailed logs with the Elementary support team for more specific guidance. I hope this helps resolve your empty report issue!