duckdb / dbt-duckdb

dbt (http://getdbt.com) adapter for DuckDB (http://duckdb.org)
Apache License 2.0
932 stars 89 forks source link

Add safety check for node in graph #472

Closed tehunter closed 3 weeks ago

tehunter commented 3 weeks ago

With dbt's unit-test feature, dbt may not populate the graph when running dbt test -s model_to_test. This will result in an error in register_upstream_external_models:

on-run-start failed, error:
 'dict object' has no attribute 'unit_test.project_name.model_name.test_name'

This change checks if a node is present before looking for its dependencies.