Jorge Simonovich
05/21/2024, 3:45 PMelementary.column_anomalies tests in š§± Databricks since 14.05.2024.
The problem is specific to these tests and is causing a syntax error in the temporary tables created for the column anomalies. Here are the details:
dbt Debug Logs (partial):
2024-05-21 14:15:27.119455 (Thread-3 (worker)): 14:15:27 On test.geca.elementary_column_anomalies_ref_deal_stages_average__amount_in_eur.7cc84cfde1: /* {"app": "dbt", "dbt_version": "1.7.14", "dbt_databricks_version": "1.7.15", "databricks_sql_connector_version": "2.9.6", "profile_name": "user", "target_name": "p_user_pmbi", "node_id": "test.geca.elementary_column_anomalies_ref_deal_stages_average__amount_in_eur.7cc84cfde1"} */
create or replace table `p_user_pmbi`.`elementary`.`test_7cc84cfde1_elementary_column_anomalies_ref_deal_stages_average__amount_in_eur__metrics__tmp_20240521141526773350`
using delta
as
with monitored_table as (
select * from `p_user_pmbi`.`silver_ref_sales`.`ref_deal_stages`
),
filtered_monitored_table as (
select `amount_in_eur`,cast(null as timestamp) as start_bucket_in_data,
from monitored_table
),
Error
14:19:29 Runtime Error in test elementary_column_anomalies_ref_deals_info_average__amount_in_eur (models/intermediate/sales/_ref_sales_models.yml)
[UNRESOLVED_COLUMN.WITHOUT_SUGGESTION] A column, variable, or function parameter with name `amount_in_eur` cannot be resolved. SQLSTATE: 42703; line 30 pos 19
Based on the above I concluded that:
⢠The error points to the column name amount_in_eur, which does exist.
⢠The root cause is an extra comma in the SELECT statement: select amount_in_eur, cast(null as timestamp) as start_bucket_in_data,.
Any idea what is causing this behavior in the compiling process and how to fix it?
Thanks in advance!Ange Melhuish
06/13/2024, 3:32 PMAnge Melhuish
06/13/2024, 4:31 PM, - I solved this by adding a timestamp_column in my config to avoid the else in this if/else code here.Ange Melhuish
06/13/2024, 4:51 PMJorge Simonovich
06/26/2024, 9:15 AMAnge Melhuish
06/26/2024, 1:28 PM