Only work with dbt catalog data if load_catalog is False (#2686)

This commit is contained in:
Remi 2021-06-14 17:58:19 -06:00 committed by GitHub
parent 0b75b4a96a
commit 9fb2e6aaa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,15 +97,18 @@ def extract_dbt_entities(
node = nodes[key]
dbtNode = DBTNode()
if key not in catalog and load_catalog is False:
continue
if "identifier" in node and load_catalog is False:
dbtNode.name = node["identifier"]
else:
dbtNode.name = node["name"]
dbtNode.dbt_name = key
dbtNode.database = node["database"]
dbtNode.schema = node["schema"]
dbtNode.dbt_file_path = node["original_file_path"]
dbtNode.node_type = node["resource_type"]
if "identifier" in node and load_catalog is False:
dbtNode.name = node["identifier"]
else:
dbtNode.name = node["name"]
if "materialized" in node["config"].keys():
# It's a model