This commit is contained in:
Grzegorz Michalski
2026-03-02 09:47:35 +01:00
commit 2c225d68ac
715 changed files with 130067 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
{% macro get_task_history_key(model_name) %}
{% if execute %}
{% set fetch_fk %}
SELECT A_TASK_HISTORY_KEY
FROM {{ source('control_tables', 'A_TASK_HISTORY') }}
WHERE TASK_RUN_ID = '{{ invocation_id }}'
AND TASK_NAME = '{{ model_name }}'
AND SERVICE_NAME = '{{ var("input_service_name") }}'
{% endset %}
{% set a_task_history_key_result = run_query(fetch_fk) %}
{% set a_task_history_key = a_task_history_key_result.columns[0].values()[0] %}
{{ return(a_task_history_key) }}
{% endif %}
{% endmacro %}