15 lines
466 B
SQL
15 lines
466 B
SQL
{% macro get_child_models(model_name) %}
|
|
{% if execute %}
|
|
{% set graph = graph.nodes %}
|
|
{% set children = [] %}
|
|
{% for node, details in graph.items() %}
|
|
{% for item in details.depends_on.nodes %}
|
|
{% if model_name == item.split('.')[2] %}
|
|
{% do children.append(node.split('.')[2]) %}
|
|
{% break %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{{ return(children) }}
|
|
{% endif %}
|
|
{% endmacro %} |