From 5f4744f2c8eaf6313b4efc13bdff0c7faabf5ec2 Mon Sep 17 00:00:00 2001 From: Chenyu Li Date: Mon, 23 Oct 2023 13:42:59 -0700 Subject: [PATCH] remove any leftover inline node before compile (#248) --- dbt_server/services/dbt_service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbt_server/services/dbt_service.py b/dbt_server/services/dbt_service.py index 56e7828..97857d5 100644 --- a/dbt_server/services/dbt_service.py +++ b/dbt_server/services/dbt_service.py @@ -125,6 +125,10 @@ def compile_sql(manifest, project_dir, sql_config): # Currently this command will load project and profile from disk # It uses the manifest passed in try: + # remove any inline_query nodes that might be generated in previous parse + for node_name in manifest.nodes.keys(): + if "inline_query" in node_name: + manifest.nodes.pop(node_name) profile_name = get_profile_name(sql_config) # Invoke dbtRunner to compile SQL code # TODO skip relational cache.