From f14daee975ec6a0cc43d165602fc9d09e6dc3bcf Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Wed, 21 Aug 2024 11:38:57 -0700 Subject: [PATCH] Improve log for better debugging (#1376) Yesterday we saw a slew of these errors, but not sure of the root cause. Adding more detail to the error log here so we can debug further. Logs here: https://dbtlabsmt.datadoghq.com/logs?query=service%3Ametricflow-server%20%40levelname%3AERROR%20-%22no%20child%20processes%22%20-%22server%20process%22%20-%22waiting%20for%20application%22%20-%22run-prod%5D%20terminated%22%20-%22Application%20shutdown%22%20-%22Application%20startup%22%20-%22shutting%20down%22%20&agg_m=count&agg_m_source=base&agg_t=count&cols=host%2Cservice&event=AgAAAZFyGmm4JfsmrAAAAAAAAAAYAAAAAEFaRnlHbjhPQUFDY3V5YVJsWVc3RXdCVgAAACQAAAAAMDE5MTcyMjAtMzhiZi00ODBjLWEyMWQtNGE1MmVmNTIzMjNi&fromUser=true&messageDisplay=inline&refresh_mode=paused&sort=time&source=monitor_notif&storage=hot&stream_sort=desc&viz=stream&from_ts=1724196000000&to_ts=1724196600000&live=false --- metricflow/plan_conversion/dataflow_to_sql.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/metricflow/plan_conversion/dataflow_to_sql.py b/metricflow/plan_conversion/dataflow_to_sql.py index 63592b54f7..ddb2024609 100644 --- a/metricflow/plan_conversion/dataflow_to_sql.py +++ b/metricflow/plan_conversion/dataflow_to_sql.py @@ -924,7 +924,10 @@ def visit_combine_aggregated_outputs_node(self, node: CombineAggregatedOutputsNo linkable_specs = from_data_set.data_set.instance_set.spec_set.linkable_specs assert all( [set(x.data_set.instance_set.spec_set.linkable_specs) == set(linkable_specs) for x in join_data_sets] - ), "All parent nodes should have the same set of linkable instances since all values are coalesced." + ), ( + "All join data sets should have the same set of linkable instances as the from dataset since all values are coalesced. " + f"Got from dataset: {from_data_set}\nGot join datasets: {join_data_sets}" + ) linkable_spec_set = from_data_set.data_set.instance_set.spec_set.transform(SelectOnlyLinkableSpecs()) join_type = SqlJoinType.CROSS_JOIN if len(linkable_spec_set.all_specs) == 0 else SqlJoinType.FULL_OUTER