<reponame>buckylee2019/sqlg-airflow

# -*- coding: utf-8 -*-
# Author        : <NAME>
# LastUpdate    : 2020/10/04
# Impact        : Jobs generated by SQLG
# Message       : Humanity towards others, we live by sharing. Fear can hold you prisoner, only hope can set you free.

# from __future__ import print_function
import logging
import re
import airflow
from datetime import datetime, timedelta
from airflow.operators.sensors import ExternalTaskSensor
from airflow.operators.python_operator import PythonOperator
from airflow.operators.bash_operator import BashOperator
from airflow.contrib.sensors.file_sensor import FileSensor
from airflow import models
from airflow.models import Variable

from acme.operators.sqlg_oracle import OracleOperatorWithTemplatedParams
from airflow.operators.oracle_operator import OracleOperator
# DB_NAME = 'DWH' # for future xDB operator

tmpl_search_path = Variable.get("sql_path")



args = {
    "owner": "JESSEWEI",
    'start_date': airflow.utils.dates.days_ago(1),
    'provide_context': True
}	
# XSLT:loop: declaration: END}





# XSLT:loop: JOB_FLOW_NAME: START{
job_flow_name = "D_ODS_PRD_SRC"
if job_flow_name == 'I_SDM_CMN':
    data_stage = ['ODS']
else:
    data_stage = re.findall(r"_(.*?)_","D_ODS_PRD_SRC")
D_ODS_PRD_SRC = airflow.DAG(
    "D_ODS_PRD_SRC",
    tags=["PRD", data_stage[0]],
    schedule_interval="RCG-D-NAT",
    dagrun_timeout=timedelta(minutes=60),
    template_searchpath=tmpl_search_path,
    default_args=args,
    start_date=airflow.utils.dates.days_ago(1),    
    max_active_runs=1
	)
job_flow_name = "D_SDM_PRD"
if job_flow_name == 'I_SDM_CMN':
    data_stage = ['ODS']
else:
    data_stage = re.findall(r"_(.*?)_","D_SDM_PRD")
D_SDM_PRD = airflow.DAG(
    "D_SDM_PRD",
    tags=["PRD", data_stage[0]],
    schedule_interval="@daily",
    dagrun_timeout=timedelta(minutes=60),
    template_searchpath=tmpl_search_path,
    default_args=args,
    start_date=airflow.utils.dates.days_ago(1),    
    max_active_runs=1
	)
job_flow_name = "D_DM_PRD"
if job_flow_name == 'I_SDM_CMN':
    data_stage = ['ODS']
else:
    data_stage = re.findall(r"_(.*?)_","D_DM_PRD")
D_DM_PRD = airflow.DAG(
    "D_DM_PRD",
    tags=["PRD", data_stage[0]],
    schedule_interval="@daily",
    dagrun_timeout=timedelta(minutes=60),
    template_searchpath=tmpl_search_path,
    default_args=args,
    start_date=airflow.utils.dates.days_ago(1),    
    max_active_runs=1
	)

# XSLT:loop: JOB_FLOW_NAME: END}



# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_SYSTEM_ITEMS_B"
MTL_SYSTEM_ITEMS_B = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FND_COLUMNS"
FND_COLUMNS = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FND_LOOKUP_TYPES"
FND_LOOKUP_TYPES = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FND_LOOKUP_VALUES"
FND_LOOKUP_VALUES = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FND_TABLES"
FND_TABLES = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_CATEGORIES_B"
MTL_CATEGORIES_B = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_CATEGORY_SETS_B"
MTL_CATEGORY_SETS_B = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_CUSTOMER_ITEMS"
MTL_CUSTOMER_ITEMS = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_ITEM_CATALOG_GROUPS_B"
MTL_ITEM_CATALOG_GROUPS_B = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_ITEM_CATEGORIES"
MTL_ITEM_CATEGORIES = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_ITEM_STATUS_TL"
MTL_ITEM_STATUS_TL = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "PRJ_WORKTIMEDATA"
PRJ_WORKTIMEDATA = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "XXPLM_MODEL"
XXPLM_MODEL = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "XXPLM_PROJECT"
XXPLM_PROJECT = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "XXPLM_TFD"
XXPLM_TFD = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "Z_CDOCUMENT_CHECKING_RULE"
Z_CDOCUMENT_CHECKING_RULE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MV_XXPLM_MODEL_CHECKRULE_V"
MV_XXPLM_MODEL_CHECKRULE_V = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "XXPLM_EC_CHANGE_TYPE"
XXPLM_EC_CHANGE_TYPE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "NSP_REQ_HEADERS"
NSP_REQ_HEADERS = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "NSP_REQ_LINES"
NSP_REQ_LINES = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "EFLOW_PCS_HEADER_TW"
EFLOW_PCS_HEADER_TW = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "EFLOW_PCS_LINEEE_TW"
EFLOW_PCS_LINEEE_TW = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "EFLOW_PCS_LINEER_TW"
EFLOW_PCS_LINEER_TW = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "EFLOW_BTMS_EXPENSEPROJECT_TW"
EFLOW_BTMS_EXPENSEPROJECT_TW = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MV_PROJECT_ACTIVITY_V"
MV_PROJECT_ACTIVITY_V = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MV_XXPLM_CFDMETADATA_V"
MV_XXPLM_CFDMETADATA_V = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_PLM_CATEGORY"
SDM_PLM_CATEGORY = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_ITEM"
SDM_ITEM = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_ECN_REASON"
SDM_ECN_REASON = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_XXPLM_EC"
SDM_XXPLM_EC = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_ECN_CASE_AFTER_MP"
SDM_ECN_CASE_AFTER_MP = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_CDOC_COMPLETION_RATE"
SDM_CDOC_COMPLETION_RATE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_UPLOAD_CDOC_COUNT"
SDM_UPLOAD_CDOC_COUNT = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_TOTAL_CDOC_COUNT"
SDM_TOTAL_CDOC_COUNT = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_PROJECT_CODE"
SDM_PROJECT_CODE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_TOOLING_TOTAL_EXPENSE"
SDM_TOOLING_TOTAL_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_DMST_AND_INTL_TRAVEL_EXP"
SDM_DMST_AND_INTL_TRAVEL_EXP = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_RD_LABOR_HOURS_EXPENSE"
SDM_RD_LABOR_HOURS_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_TESTING_EXPENSE"
SDM_TESTING_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_CTF_EXPENSE"
SDM_CTF_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_EQT_EXPENSE"
SDM_EQT_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_EPR_MFG_SAMPLE_BUILD_EXP"
SDM_EPR_MFG_SAMPLE_BUILD_EXP = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_EPR_MFG_CONVERSION_COST"
SDM_EPR_MFG_CONVERSION_COST = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_CDOC_PLANNED_DEV_TIME"
SDM_CDOC_PLANNED_DEV_TIME = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_PROD_DEV_MLST_DELAY_RATE"
SDM_PROD_DEV_MLST_DELAY_RATE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_CDOC_DELAY_TIME"
SDM_CDOC_DELAY_TIME = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_PRODUCT_ACTUAL_EXPENSE"
SDM_PRODUCT_ACTUAL_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_PRODUCT_EXPENSE_BUDGET"
SDM_PRODUCT_EXPENSE_BUDGET = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_PROD_DEV_MLST_DELAY_RATE"
FCT_PROD_DEV_MLST_DELAY_RATE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_ECN_CASE_AFTER_MP"
FCT_ECN_CASE_AFTER_MP = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_EPR_MFG_CONVERSION_COST"
FCT_EPR_MFG_CONVERSION_COST = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_TOOLING_TOTAL_EXPENSE"
FCT_TOOLING_TOTAL_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_DMST_AND_INTL_TRAVEL_EXP"
FCT_DMST_AND_INTL_TRAVEL_EXP = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_TESTING_EXPENSE"
FCT_TESTING_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "DIM_ITEM"
DIM_ITEM = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "DIM_PLM_CATEGORY"
DIM_PLM_CATEGORY = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "DIM_ECN_REASON"
DIM_ECN_REASON = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "DIM_PROJECT_CODE"
DIM_PROJECT_CODE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )


ExternalTaskSensor.ui_color = 'white'
ExternalTaskSensor.ui_fgcolor = 'blue'

# tmpl_search_path = Variable.get("sql_path")
	

# 	XSLT:loop: JOB_FLOW_NAME-and-PRE_JOB: External:START{{

my_taskid = "D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG"
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_STG_INIT",
    external_task_id="SYS_STS_STG",
    mode="reschedule",
    dag=D_ODS_PRD_SRC,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL"
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="XXPLM_MODEL",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__MTL_SYSTEM_ITEMS_B"
D_SDM_PRDxD_ODS_PRD_SRC__MTL_SYSTEM_ITEMS_B= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="MTL_SYSTEM_ITEMS_B",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_EC_CHANGE_TYPE"
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_EC_CHANGE_TYPE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="XXPLM_EC_CHANGE_TYPE",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_STG_INIT__SYS_STS_STG"
D_SDM_PRDxD_STG_INIT__SYS_STS_STG= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_STG_INIT",
    external_task_id="SYS_STS_STG",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT"
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_FIN",
    external_task_id="SDM_MANUFACTURING_PLANT",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__Z_CDOCUMENT_CHECKING_RULE"
D_SDM_PRDxD_ODS_PRD_SRC__Z_CDOCUMENT_CHECKING_RULE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="Z_CDOCUMENT_CHECKING_RULE",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_PROJECT"
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_PROJECT= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="XXPLM_PROJECT",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS"
D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="NSP_REQ_HEADERS",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_HEADER_TW"
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_HEADER_TW= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="EFLOW_PCS_HEADER_TW",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEEE_TW"
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEEE_TW= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="EFLOW_PCS_LINEEE_TW",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEER_TW"
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEER_TW= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="EFLOW_PCS_LINEER_TW",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_BTMS_EXPENSEPROJECT_TW"
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_BTMS_EXPENSEPROJECT_TW= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="EFLOW_BTMS_EXPENSEPROJECT_TW",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_MFG_SRC__XXWIP_STOREIN_USAGE_TEMP"
D_SDM_PRDxD_ODS_MFG_SRC__XXWIP_STOREIN_USAGE_TEMP= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_MFG_SRC",
    external_task_id="XXWIP_STOREIN_USAGE_TEMP",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_SDM_SCM__SDM_ORG_HIER"
D_SDM_PRDxD_SDM_SCM__SDM_ORG_HIER= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_SCM",
    external_task_id="SDM_ORG_HIER",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_PROD_DEV_MLST_DELAY_RATE"
D_DM_PRDxD_SDM_PRD__SDM_PROD_DEV_MLST_DELAY_RATE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_PROD_DEV_MLST_DELAY_RATE",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_CDOC_PLANNED_DEV_TIME"
D_DM_PRDxD_SDM_PRD__SDM_CDOC_PLANNED_DEV_TIME= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_CDOC_PLANNED_DEV_TIME",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_CDOC_DELAY_TIME"
D_DM_PRDxD_SDM_PRD__SDM_CDOC_DELAY_TIME= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_CDOC_DELAY_TIME",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_ECN_CASE_AFTER_MP"
D_DM_PRDxD_SDM_PRD__SDM_ECN_CASE_AFTER_MP= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_ECN_CASE_AFTER_MP",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_CONVERSION_COST"
D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_CONVERSION_COST= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_EPR_MFG_CONVERSION_COST",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_TOOLING_TOTAL_EXPENSE"
D_DM_PRDxD_SDM_PRD__SDM_TOOLING_TOTAL_EXPENSE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_TOOLING_TOTAL_EXPENSE",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_DMST_AND_INTL_TRAVEL_EXP"
D_DM_PRDxD_SDM_PRD__SDM_DMST_AND_INTL_TRAVEL_EXP= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_DMST_AND_INTL_TRAVEL_EXP",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_TESTING_EXPENSE"
D_DM_PRDxD_SDM_PRD__SDM_TESTING_EXPENSE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_TESTING_EXPENSE",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_STG_INIT__SYS_STS_STG"
D_DM_PRDxD_STG_INIT__SYS_STS_STG= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_STG_INIT",
    external_task_id="SYS_STS_STG",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_EQT_EXPENSE"
D_DM_PRDxD_SDM_PRD__SDM_EQT_EXPENSE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_EQT_EXPENSE",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_SAMPLE_BUILD_EXP"
D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_SAMPLE_BUILD_EXP= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_EPR_MFG_SAMPLE_BUILD_EXP",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_ITEM"
D_DM_PRDxD_SDM_PRD__SDM_ITEM= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_ITEM",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_PLM_CATEGORY"
D_DM_PRDxD_SDM_PRD__SDM_PLM_CATEGORY= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_PLM_CATEGORY",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_ECN_REASON"
D_DM_PRDxD_SDM_PRD__SDM_ECN_REASON= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_ECN_REASON",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_PROJECT_CODE"
D_DM_PRDxD_SDM_PRD__SDM_PROJECT_CODE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_PROJECT_CODE",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)
	
# 	XSLT:loop: JOB_FLOW_NAME-and-PRE_JOB: External: END}}


# XSLT:loop: JOB_FLOW_NAME: START{

# 	XSLT:loop: Rows-by-JOB_FLOW_NAME: JOB_NAME: START{{
# 	 	FLOW: D_ODS_PRD_SRC.MTL_SYSTEM_ITEMS_B
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_SYSTEM_ITEMS_B)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(FND_COLUMNS)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(FND_LOOKUP_TYPES)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(FND_LOOKUP_VALUES)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(FND_TABLES)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_CATEGORIES_B)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_CATEGORY_SETS_B)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_CUSTOMER_ITEMS)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_ITEM_CATALOG_GROUPS_B)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_ITEM_CATEGORIES)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_ITEM_STATUS_TL)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(PRJ_WORKTIMEDATA)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(XXPLM_MODEL)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(XXPLM_PROJECT)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(XXPLM_TFD)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(Z_CDOCUMENT_CHECKING_RULE)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MV_XXPLM_MODEL_CHECKRULE_V)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(XXPLM_EC_CHANGE_TYPE)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(NSP_REQ_HEADERS)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(NSP_REQ_LINES)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(EFLOW_PCS_HEADER_TW)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(EFLOW_PCS_LINEEE_TW)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(EFLOW_PCS_LINEER_TW)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(EFLOW_BTMS_EXPENSEPROJECT_TW)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MV_PROJECT_ACTIVITY_V)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MV_XXPLM_CFDMETADATA_V)

# 	XSLT:loop: Rows-by-JOB_FLOW_NAME: JOB_NAME: START{{
# 	 	FLOW: D_SDM_PRD.SDM_PLM_CATEGORY
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL.set_downstream(SDM_PLM_CATEGORY)
D_SDM_PRDxD_ODS_PRD_SRC__MTL_SYSTEM_ITEMS_B.set_downstream(SDM_ITEM)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_EC_CHANGE_TYPE.set_downstream(SDM_ECN_REASON)
D_SDM_PRDxD_STG_INIT__SYS_STS_STG.set_downstream(SDM_XXPLM_EC)

SDM_XXPLM_EC.set_downstream(SDM_ECN_CASE_AFTER_MP)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL.set_downstream(SDM_ECN_CASE_AFTER_MP)
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT.set_downstream(SDM_ECN_CASE_AFTER_MP)

SDM_UPLOAD_CDOC_COUNT.set_downstream(SDM_CDOC_COMPLETION_RATE)

SDM_TOTAL_CDOC_COUNT.set_downstream(SDM_CDOC_COMPLETION_RATE)
D_SDM_PRDxD_ODS_PRD_SRC__Z_CDOCUMENT_CHECKING_RULE.set_downstream(SDM_UPLOAD_CDOC_COUNT)

SDM_UPLOAD_CDOC_COUNT.set_downstream(SDM_TOTAL_CDOC_COUNT)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_PROJECT.set_downstream(SDM_PROJECT_CODE)
D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS.set_downstream(SDM_TOOLING_TOTAL_EXPENSE)
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT.set_downstream(SDM_TOOLING_TOTAL_EXPENSE)

SDM_PROJECT_CODE.set_downstream(SDM_TOOLING_TOTAL_EXPENSE)
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_HEADER_TW.set_downstream(SDM_DMST_AND_INTL_TRAVEL_EXP)
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEEE_TW.set_downstream(SDM_DMST_AND_INTL_TRAVEL_EXP)
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEER_TW.set_downstream(SDM_DMST_AND_INTL_TRAVEL_EXP)
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_BTMS_EXPENSEPROJECT_TW.set_downstream(SDM_DMST_AND_INTL_TRAVEL_EXP)
D_SDM_PRDxD_STG_INIT__SYS_STS_STG.set_downstream(SDM_RD_LABOR_HOURS_EXPENSE)

SDM_CTF_EXPENSE.set_downstream(SDM_TESTING_EXPENSE)

SDM_EQT_EXPENSE.set_downstream(SDM_TESTING_EXPENSE)
D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS.set_downstream(SDM_CTF_EXPENSE)
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT.set_downstream(SDM_CTF_EXPENSE)

SDM_PROJECT_CODE.set_downstream(SDM_CTF_EXPENSE)
D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS.set_downstream(SDM_EQT_EXPENSE)
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT.set_downstream(SDM_EQT_EXPENSE)

SDM_PROJECT_CODE.set_downstream(SDM_EQT_EXPENSE)
D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS.set_downstream(SDM_EPR_MFG_SAMPLE_BUILD_EXP)
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT.set_downstream(SDM_EPR_MFG_SAMPLE_BUILD_EXP)

SDM_PROJECT_CODE.set_downstream(SDM_EPR_MFG_SAMPLE_BUILD_EXP)
D_SDM_PRDxD_ODS_MFG_SRC__XXWIP_STOREIN_USAGE_TEMP.set_downstream(SDM_EPR_MFG_CONVERSION_COST)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL.set_downstream(SDM_EPR_MFG_CONVERSION_COST)
D_SDM_PRDxD_SDM_SCM__SDM_ORG_HIER.set_downstream(SDM_EPR_MFG_CONVERSION_COST)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL.set_downstream(SDM_CDOC_PLANNED_DEV_TIME)

SDM_CDOC_PLANNED_DEV_TIME.set_downstream(SDM_PROD_DEV_MLST_DELAY_RATE)

SDM_CDOC_DELAY_TIME.set_downstream(SDM_PROD_DEV_MLST_DELAY_RATE)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL.set_downstream(SDM_CDOC_DELAY_TIME)

SDM_PRODUCT_EXPENSE_BUDGET.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_DMST_AND_INTL_TRAVEL_EXP.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_EPR_MFG_CONVERSION_COST.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_EPR_MFG_SAMPLE_BUILD_EXP.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_CTF_EXPENSE.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_EQT_EXPENSE.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_TOOLING_TOTAL_EXPENSE.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)
D_SDM_PRDxD_STG_INIT__SYS_STS_STG.set_downstream(SDM_PRODUCT_EXPENSE_BUDGET)

# 	XSLT:loop: Rows-by-JOB_FLOW_NAME: JOB_NAME: START{{
# 	 	FLOW: D_DM_PRD.FCT_PROD_DEV_MLST_DELAY_RATE
D_DM_PRDxD_SDM_PRD__SDM_PROD_DEV_MLST_DELAY_RATE.set_downstream(FCT_PROD_DEV_MLST_DELAY_RATE)
D_DM_PRDxD_SDM_PRD__SDM_CDOC_PLANNED_DEV_TIME.set_downstream(FCT_PROD_DEV_MLST_DELAY_RATE)
D_DM_PRDxD_SDM_PRD__SDM_CDOC_DELAY_TIME.set_downstream(FCT_PROD_DEV_MLST_DELAY_RATE)
D_DM_PRDxD_SDM_PRD__SDM_ECN_CASE_AFTER_MP.set_downstream(FCT_ECN_CASE_AFTER_MP)
D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_CONVERSION_COST.set_downstream(FCT_EPR_MFG_CONVERSION_COST)
D_DM_PRDxD_SDM_PRD__SDM_TOOLING_TOTAL_EXPENSE.set_downstream(FCT_TOOLING_TOTAL_EXPENSE)
D_DM_PRDxD_SDM_PRD__SDM_DMST_AND_INTL_TRAVEL_EXP.set_downstream(FCT_DMST_AND_INTL_TRAVEL_EXP)
D_DM_PRDxD_SDM_PRD__SDM_TESTING_EXPENSE.set_downstream(FCT_TESTING_EXPENSE)
D_DM_PRDxD_STG_INIT__SYS_STS_STG.set_downstream(FCT_TESTING_EXPENSE)
D_DM_PRDxD_SDM_PRD__SDM_EQT_EXPENSE.set_downstream(FCT_TESTING_EXPENSE)
D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_SAMPLE_BUILD_EXP.set_downstream(FCT_TESTING_EXPENSE)
D_DM_PRDxD_SDM_PRD__SDM_ITEM.set_downstream(DIM_ITEM)
D_DM_PRDxD_SDM_PRD__SDM_PLM_CATEGORY.set_downstream(DIM_PLM_CATEGORY)
D_DM_PRDxD_SDM_PRD__SDM_ECN_REASON.set_downstream(DIM_ECN_REASON)
D_DM_PRDxD_SDM_PRD__SDM_PROJECT_CODE.set_downstream(DIM_PROJECT_CODE)


# -*- coding: utf-8 -*-
# Author        : <NAME>
# LastUpdate    : 2020/10/04
# Impact        : Jobs generated by SQLG
# Message       : Humanity towards others, we live by sharing. Fear can hold you prisoner, only hope can set you free.

# from __future__ import print_function
import logging
import re
import airflow
from datetime import datetime, timedelta
from airflow.operators.sensors import ExternalTaskSensor
from airflow.operators.python_operator import PythonOperator
from airflow.operators.bash_operator import BashOperator
from airflow.contrib.sensors.file_sensor import FileSensor
from airflow import models
from airflow.models import Variable

from acme.operators.sqlg_oracle import OracleOperatorWithTemplatedParams
from airflow.operators.oracle_operator import OracleOperator
# DB_NAME = 'DWH' # for future xDB operator

tmpl_search_path = Variable.get("sql_path")



args = {
    "owner": "JESSEWEI",
    'start_date': airflow.utils.dates.days_ago(1),
    'provide_context': True
}	
# XSLT:loop: declaration: END}





# XSLT:loop: JOB_FLOW_NAME: START{
job_flow_name = "D_ODS_PRD_SRC"
if job_flow_name == 'I_SDM_CMN':
    data_stage = ['ODS']
else:
    data_stage = re.findall(r"_(.*?)_","D_ODS_PRD_SRC")
D_ODS_PRD_SRC = airflow.DAG(
    "D_ODS_PRD_SRC",
    tags=["PRD", data_stage[0]],
    schedule_interval="RCG-D-NAT",
    dagrun_timeout=timedelta(minutes=60),
    template_searchpath=tmpl_search_path,
    default_args=args,
    start_date=airflow.utils.dates.days_ago(1),    
    max_active_runs=1
	)
job_flow_name = "D_SDM_PRD"
if job_flow_name == 'I_SDM_CMN':
    data_stage = ['ODS']
else:
    data_stage = re.findall(r"_(.*?)_","D_SDM_PRD")
D_SDM_PRD = airflow.DAG(
    "D_SDM_PRD",
    tags=["PRD", data_stage[0]],
    schedule_interval="@daily",
    dagrun_timeout=timedelta(minutes=60),
    template_searchpath=tmpl_search_path,
    default_args=args,
    start_date=airflow.utils.dates.days_ago(1),    
    max_active_runs=1
	)
job_flow_name = "D_DM_PRD"
if job_flow_name == 'I_SDM_CMN':
    data_stage = ['ODS']
else:
    data_stage = re.findall(r"_(.*?)_","D_DM_PRD")
D_DM_PRD = airflow.DAG(
    "D_DM_PRD",
    tags=["PRD", data_stage[0]],
    schedule_interval="@daily",
    dagrun_timeout=timedelta(minutes=60),
    template_searchpath=tmpl_search_path,
    default_args=args,
    start_date=airflow.utils.dates.days_ago(1),    
    max_active_runs=1
	)

# XSLT:loop: JOB_FLOW_NAME: END}



# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_SYSTEM_ITEMS_B"
MTL_SYSTEM_ITEMS_B = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FND_COLUMNS"
FND_COLUMNS = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FND_LOOKUP_TYPES"
FND_LOOKUP_TYPES = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FND_LOOKUP_VALUES"
FND_LOOKUP_VALUES = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FND_TABLES"
FND_TABLES = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_CATEGORIES_B"
MTL_CATEGORIES_B = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_CATEGORY_SETS_B"
MTL_CATEGORY_SETS_B = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_CUSTOMER_ITEMS"
MTL_CUSTOMER_ITEMS = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_ITEM_CATALOG_GROUPS_B"
MTL_ITEM_CATALOG_GROUPS_B = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_ITEM_CATEGORIES"
MTL_ITEM_CATEGORIES = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MTL_ITEM_STATUS_TL"
MTL_ITEM_STATUS_TL = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "PRJ_WORKTIMEDATA"
PRJ_WORKTIMEDATA = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "XXPLM_MODEL"
XXPLM_MODEL = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "XXPLM_PROJECT"
XXPLM_PROJECT = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "XXPLM_TFD"
XXPLM_TFD = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "Z_CDOCUMENT_CHECKING_RULE"
Z_CDOCUMENT_CHECKING_RULE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MV_XXPLM_MODEL_CHECKRULE_V"
MV_XXPLM_MODEL_CHECKRULE_V = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "XXPLM_EC_CHANGE_TYPE"
XXPLM_EC_CHANGE_TYPE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "NSP_REQ_HEADERS"
NSP_REQ_HEADERS = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "NSP_REQ_LINES"
NSP_REQ_LINES = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "EFLOW_PCS_HEADER_TW"
EFLOW_PCS_HEADER_TW = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "EFLOW_PCS_LINEEE_TW"
EFLOW_PCS_LINEEE_TW = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "EFLOW_PCS_LINEER_TW"
EFLOW_PCS_LINEER_TW = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "EFLOW_BTMS_EXPENSEPROJECT_TW"
EFLOW_BTMS_EXPENSEPROJECT_TW = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MV_PROJECT_ACTIVITY_V"
MV_PROJECT_ACTIVITY_V = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "MV_XXPLM_CFDMETADATA_V"
MV_XXPLM_CFDMETADATA_V = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_ODS_PRD_SRC,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_PLM_CATEGORY"
SDM_PLM_CATEGORY = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_ITEM"
SDM_ITEM = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_ECN_REASON"
SDM_ECN_REASON = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_XXPLM_EC"
SDM_XXPLM_EC = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_ECN_CASE_AFTER_MP"
SDM_ECN_CASE_AFTER_MP = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_CDOC_COMPLETION_RATE"
SDM_CDOC_COMPLETION_RATE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_UPLOAD_CDOC_COUNT"
SDM_UPLOAD_CDOC_COUNT = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_TOTAL_CDOC_COUNT"
SDM_TOTAL_CDOC_COUNT = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_PROJECT_CODE"
SDM_PROJECT_CODE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_TOOLING_TOTAL_EXPENSE"
SDM_TOOLING_TOTAL_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_DMST_AND_INTL_TRAVEL_EXP"
SDM_DMST_AND_INTL_TRAVEL_EXP = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_RD_LABOR_HOURS_EXPENSE"
SDM_RD_LABOR_HOURS_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_TESTING_EXPENSE"
SDM_TESTING_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_CTF_EXPENSE"
SDM_CTF_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_EQT_EXPENSE"
SDM_EQT_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_EPR_MFG_SAMPLE_BUILD_EXP"
SDM_EPR_MFG_SAMPLE_BUILD_EXP = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_EPR_MFG_CONVERSION_COST"
SDM_EPR_MFG_CONVERSION_COST = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_CDOC_PLANNED_DEV_TIME"
SDM_CDOC_PLANNED_DEV_TIME = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_PROD_DEV_MLST_DELAY_RATE"
SDM_PROD_DEV_MLST_DELAY_RATE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_CDOC_DELAY_TIME"
SDM_CDOC_DELAY_TIME = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_PRODUCT_ACTUAL_EXPENSE"
SDM_PRODUCT_ACTUAL_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "SDM_PRODUCT_EXPENSE_BUDGET"
SDM_PRODUCT_EXPENSE_BUDGET = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_SDM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_PROD_DEV_MLST_DELAY_RATE"
FCT_PROD_DEV_MLST_DELAY_RATE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_ECN_CASE_AFTER_MP"
FCT_ECN_CASE_AFTER_MP = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_EPR_MFG_CONVERSION_COST"
FCT_EPR_MFG_CONVERSION_COST = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_TOOLING_TOTAL_EXPENSE"
FCT_TOOLING_TOTAL_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_DMST_AND_INTL_TRAVEL_EXP"
FCT_DMST_AND_INTL_TRAVEL_EXP = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "FCT_TESTING_EXPENSE"
FCT_TESTING_EXPENSE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "DIM_ITEM"
DIM_ITEM = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "DIM_PLM_CATEGORY"
DIM_PLM_CATEGORY = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "DIM_ECN_REASON"
DIM_ECN_REASON = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )

# JOB_TYPE=ODS-MAIN
my_taskid = "DIM_PROJECT_CODE"
DIM_PROJECT_CODE = OracleOperatorWithTemplatedParams(
    task_id=my_taskid,
    dag=D_DM_PRD,
    parameters=({":END_DT_CHAR":"{{ ds_nodash }}"}),
    sql= "Begin SQLEXT." + my_taskid + "_SP("+  
        ":END_DT_CHAR"+
        "); End;"
    )


ExternalTaskSensor.ui_color = 'white'
ExternalTaskSensor.ui_fgcolor = 'blue'

# tmpl_search_path = Variable.get("sql_path")
	

# 	XSLT:loop: JOB_FLOW_NAME-and-PRE_JOB: External:START{{

my_taskid = "D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG"
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_STG_INIT",
    external_task_id="SYS_STS_STG",
    mode="reschedule",
    dag=D_ODS_PRD_SRC,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL"
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="XXPLM_MODEL",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__MTL_SYSTEM_ITEMS_B"
D_SDM_PRDxD_ODS_PRD_SRC__MTL_SYSTEM_ITEMS_B= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="MTL_SYSTEM_ITEMS_B",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_EC_CHANGE_TYPE"
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_EC_CHANGE_TYPE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="XXPLM_EC_CHANGE_TYPE",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_STG_INIT__SYS_STS_STG"
D_SDM_PRDxD_STG_INIT__SYS_STS_STG= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_STG_INIT",
    external_task_id="SYS_STS_STG",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT"
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_FIN",
    external_task_id="SDM_MANUFACTURING_PLANT",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__Z_CDOCUMENT_CHECKING_RULE"
D_SDM_PRDxD_ODS_PRD_SRC__Z_CDOCUMENT_CHECKING_RULE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="Z_CDOCUMENT_CHECKING_RULE",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_PROJECT"
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_PROJECT= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="XXPLM_PROJECT",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS"
D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="NSP_REQ_HEADERS",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_HEADER_TW"
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_HEADER_TW= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="EFLOW_PCS_HEADER_TW",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEEE_TW"
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEEE_TW= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="EFLOW_PCS_LINEEE_TW",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEER_TW"
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEER_TW= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="EFLOW_PCS_LINEER_TW",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_BTMS_EXPENSEPROJECT_TW"
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_BTMS_EXPENSEPROJECT_TW= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_PRD_SRC",
    external_task_id="EFLOW_BTMS_EXPENSEPROJECT_TW",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_ODS_MFG_SRC__XXWIP_STOREIN_USAGE_TEMP"
D_SDM_PRDxD_ODS_MFG_SRC__XXWIP_STOREIN_USAGE_TEMP= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_ODS_MFG_SRC",
    external_task_id="XXWIP_STOREIN_USAGE_TEMP",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_SDM_PRDxD_SDM_SCM__SDM_ORG_HIER"
D_SDM_PRDxD_SDM_SCM__SDM_ORG_HIER= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_SCM",
    external_task_id="SDM_ORG_HIER",
    mode="reschedule",
    dag=D_SDM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_PROD_DEV_MLST_DELAY_RATE"
D_DM_PRDxD_SDM_PRD__SDM_PROD_DEV_MLST_DELAY_RATE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_PROD_DEV_MLST_DELAY_RATE",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_CDOC_PLANNED_DEV_TIME"
D_DM_PRDxD_SDM_PRD__SDM_CDOC_PLANNED_DEV_TIME= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_CDOC_PLANNED_DEV_TIME",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_CDOC_DELAY_TIME"
D_DM_PRDxD_SDM_PRD__SDM_CDOC_DELAY_TIME= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_CDOC_DELAY_TIME",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_ECN_CASE_AFTER_MP"
D_DM_PRDxD_SDM_PRD__SDM_ECN_CASE_AFTER_MP= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_ECN_CASE_AFTER_MP",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_CONVERSION_COST"
D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_CONVERSION_COST= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_EPR_MFG_CONVERSION_COST",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_TOOLING_TOTAL_EXPENSE"
D_DM_PRDxD_SDM_PRD__SDM_TOOLING_TOTAL_EXPENSE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_TOOLING_TOTAL_EXPENSE",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_DMST_AND_INTL_TRAVEL_EXP"
D_DM_PRDxD_SDM_PRD__SDM_DMST_AND_INTL_TRAVEL_EXP= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_DMST_AND_INTL_TRAVEL_EXP",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_TESTING_EXPENSE"
D_DM_PRDxD_SDM_PRD__SDM_TESTING_EXPENSE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_TESTING_EXPENSE",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_STG_INIT__SYS_STS_STG"
D_DM_PRDxD_STG_INIT__SYS_STS_STG= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_STG_INIT",
    external_task_id="SYS_STS_STG",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_EQT_EXPENSE"
D_DM_PRDxD_SDM_PRD__SDM_EQT_EXPENSE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_EQT_EXPENSE",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_SAMPLE_BUILD_EXP"
D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_SAMPLE_BUILD_EXP= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_EPR_MFG_SAMPLE_BUILD_EXP",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_ITEM"
D_DM_PRDxD_SDM_PRD__SDM_ITEM= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_ITEM",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_PLM_CATEGORY"
D_DM_PRDxD_SDM_PRD__SDM_PLM_CATEGORY= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_PLM_CATEGORY",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_ECN_REASON"
D_DM_PRDxD_SDM_PRD__SDM_ECN_REASON= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_ECN_REASON",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)

my_taskid = "D_DM_PRDxD_SDM_PRD__SDM_PROJECT_CODE"
D_DM_PRDxD_SDM_PRD__SDM_PROJECT_CODE= ExternalTaskSensor(
#    schedule_interval=None,
    pool = "sensor_pool",
    task_id=my_taskid,
    external_dag_id="D_SDM_PRD",
    external_task_id="SDM_PROJECT_CODE",
    mode="reschedule",
    dag=D_DM_PRD,
    check_existence=True,
#    execution_delta=None,  # Same day as today
)
	
# 	XSLT:loop: JOB_FLOW_NAME-and-PRE_JOB: External: END}}


# XSLT:loop: JOB_FLOW_NAME: START{

# 	XSLT:loop: Rows-by-JOB_FLOW_NAME: JOB_NAME: START{{
# 	 	FLOW: D_ODS_PRD_SRC.MTL_SYSTEM_ITEMS_B
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_SYSTEM_ITEMS_B)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(FND_COLUMNS)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(FND_LOOKUP_TYPES)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(FND_LOOKUP_VALUES)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(FND_TABLES)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_CATEGORIES_B)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_CATEGORY_SETS_B)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_CUSTOMER_ITEMS)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_ITEM_CATALOG_GROUPS_B)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_ITEM_CATEGORIES)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MTL_ITEM_STATUS_TL)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(PRJ_WORKTIMEDATA)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(XXPLM_MODEL)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(XXPLM_PROJECT)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(XXPLM_TFD)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(Z_CDOCUMENT_CHECKING_RULE)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MV_XXPLM_MODEL_CHECKRULE_V)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(XXPLM_EC_CHANGE_TYPE)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(NSP_REQ_HEADERS)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(NSP_REQ_LINES)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(EFLOW_PCS_HEADER_TW)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(EFLOW_PCS_LINEEE_TW)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(EFLOW_PCS_LINEER_TW)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(EFLOW_BTMS_EXPENSEPROJECT_TW)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MV_PROJECT_ACTIVITY_V)
D_ODS_PRD_SRCxD_STG_INIT__SYS_STS_STG.set_downstream(MV_XXPLM_CFDMETADATA_V)

# 	XSLT:loop: Rows-by-JOB_FLOW_NAME: JOB_NAME: START{{
# 	 	FLOW: D_SDM_PRD.SDM_PLM_CATEGORY
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL.set_downstream(SDM_PLM_CATEGORY)
D_SDM_PRDxD_ODS_PRD_SRC__MTL_SYSTEM_ITEMS_B.set_downstream(SDM_ITEM)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_EC_CHANGE_TYPE.set_downstream(SDM_ECN_REASON)
D_SDM_PRDxD_STG_INIT__SYS_STS_STG.set_downstream(SDM_XXPLM_EC)

SDM_XXPLM_EC.set_downstream(SDM_ECN_CASE_AFTER_MP)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL.set_downstream(SDM_ECN_CASE_AFTER_MP)
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT.set_downstream(SDM_ECN_CASE_AFTER_MP)

SDM_UPLOAD_CDOC_COUNT.set_downstream(SDM_CDOC_COMPLETION_RATE)

SDM_TOTAL_CDOC_COUNT.set_downstream(SDM_CDOC_COMPLETION_RATE)
D_SDM_PRDxD_ODS_PRD_SRC__Z_CDOCUMENT_CHECKING_RULE.set_downstream(SDM_UPLOAD_CDOC_COUNT)

SDM_UPLOAD_CDOC_COUNT.set_downstream(SDM_TOTAL_CDOC_COUNT)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_PROJECT.set_downstream(SDM_PROJECT_CODE)
D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS.set_downstream(SDM_TOOLING_TOTAL_EXPENSE)
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT.set_downstream(SDM_TOOLING_TOTAL_EXPENSE)

SDM_PROJECT_CODE.set_downstream(SDM_TOOLING_TOTAL_EXPENSE)
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_HEADER_TW.set_downstream(SDM_DMST_AND_INTL_TRAVEL_EXP)
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEEE_TW.set_downstream(SDM_DMST_AND_INTL_TRAVEL_EXP)
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_PCS_LINEER_TW.set_downstream(SDM_DMST_AND_INTL_TRAVEL_EXP)
D_SDM_PRDxD_ODS_PRD_SRC__EFLOW_BTMS_EXPENSEPROJECT_TW.set_downstream(SDM_DMST_AND_INTL_TRAVEL_EXP)
D_SDM_PRDxD_STG_INIT__SYS_STS_STG.set_downstream(SDM_RD_LABOR_HOURS_EXPENSE)

SDM_CTF_EXPENSE.set_downstream(SDM_TESTING_EXPENSE)

SDM_EQT_EXPENSE.set_downstream(SDM_TESTING_EXPENSE)
D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS.set_downstream(SDM_CTF_EXPENSE)
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT.set_downstream(SDM_CTF_EXPENSE)

SDM_PROJECT_CODE.set_downstream(SDM_CTF_EXPENSE)
D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS.set_downstream(SDM_EQT_EXPENSE)
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT.set_downstream(SDM_EQT_EXPENSE)

SDM_PROJECT_CODE.set_downstream(SDM_EQT_EXPENSE)
D_SDM_PRDxD_ODS_PRD_SRC__NSP_REQ_HEADERS.set_downstream(SDM_EPR_MFG_SAMPLE_BUILD_EXP)
D_SDM_PRDxD_SDM_FIN__SDM_MANUFACTURING_PLANT.set_downstream(SDM_EPR_MFG_SAMPLE_BUILD_EXP)

SDM_PROJECT_CODE.set_downstream(SDM_EPR_MFG_SAMPLE_BUILD_EXP)
D_SDM_PRDxD_ODS_MFG_SRC__XXWIP_STOREIN_USAGE_TEMP.set_downstream(SDM_EPR_MFG_CONVERSION_COST)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL.set_downstream(SDM_EPR_MFG_CONVERSION_COST)
D_SDM_PRDxD_SDM_SCM__SDM_ORG_HIER.set_downstream(SDM_EPR_MFG_CONVERSION_COST)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL.set_downstream(SDM_CDOC_PLANNED_DEV_TIME)

SDM_CDOC_PLANNED_DEV_TIME.set_downstream(SDM_PROD_DEV_MLST_DELAY_RATE)

SDM_CDOC_DELAY_TIME.set_downstream(SDM_PROD_DEV_MLST_DELAY_RATE)
D_SDM_PRDxD_ODS_PRD_SRC__XXPLM_MODEL.set_downstream(SDM_CDOC_DELAY_TIME)

SDM_PRODUCT_EXPENSE_BUDGET.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_DMST_AND_INTL_TRAVEL_EXP.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_EPR_MFG_CONVERSION_COST.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_EPR_MFG_SAMPLE_BUILD_EXP.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_CTF_EXPENSE.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_EQT_EXPENSE.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)

SDM_TOOLING_TOTAL_EXPENSE.set_downstream(SDM_PRODUCT_ACTUAL_EXPENSE)
D_SDM_PRDxD_STG_INIT__SYS_STS_STG.set_downstream(SDM_PRODUCT_EXPENSE_BUDGET)

# 	XSLT:loop: Rows-by-JOB_FLOW_NAME: JOB_NAME: START{{
# 	 	FLOW: D_DM_PRD.FCT_PROD_DEV_MLST_DELAY_RATE
D_DM_PRDxD_SDM_PRD__SDM_PROD_DEV_MLST_DELAY_RATE.set_downstream(FCT_PROD_DEV_MLST_DELAY_RATE)
D_DM_PRDxD_SDM_PRD__SDM_CDOC_PLANNED_DEV_TIME.set_downstream(FCT_PROD_DEV_MLST_DELAY_RATE)
D_DM_PRDxD_SDM_PRD__SDM_CDOC_DELAY_TIME.set_downstream(FCT_PROD_DEV_MLST_DELAY_RATE)
D_DM_PRDxD_SDM_PRD__SDM_ECN_CASE_AFTER_MP.set_downstream(FCT_ECN_CASE_AFTER_MP)
D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_CONVERSION_COST.set_downstream(FCT_EPR_MFG_CONVERSION_COST)
D_DM_PRDxD_SDM_PRD__SDM_TOOLING_TOTAL_EXPENSE.set_downstream(FCT_TOOLING_TOTAL_EXPENSE)
D_DM_PRDxD_SDM_PRD__SDM_DMST_AND_INTL_TRAVEL_EXP.set_downstream(FCT_DMST_AND_INTL_TRAVEL_EXP)
D_DM_PRDxD_SDM_PRD__SDM_TESTING_EXPENSE.set_downstream(FCT_TESTING_EXPENSE)
D_DM_PRDxD_STG_INIT__SYS_STS_STG.set_downstream(FCT_TESTING_EXPENSE)
D_DM_PRDxD_SDM_PRD__SDM_EQT_EXPENSE.set_downstream(FCT_TESTING_EXPENSE)
D_DM_PRDxD_SDM_PRD__SDM_EPR_MFG_SAMPLE_BUILD_EXP.set_downstream(FCT_TESTING_EXPENSE)
D_DM_PRDxD_SDM_PRD__SDM_ITEM.set_downstream(DIM_ITEM)
D_DM_PRDxD_SDM_PRD__SDM_PLM_CATEGORY.set_downstream(DIM_PLM_CATEGORY)
D_DM_PRDxD_SDM_PRD__SDM_ECN_REASON.set_downstream(DIM_ECN_REASON)
D_DM_PRDxD_SDM_PRD__SDM_PROJECT_CODE.set_downstream(DIM_PROJECT_CODE)
# -*- coding: utf-8 -*- # Author        : <NAME> # LastUpdate    : 2020/10/04 # Impact        : Jobs generated by SQLG # Message       : Humanity towards others, we live by sharing. Fear can hold you prisoner, only hope can set you free. # from __future__ import print_function # DB_NAME = 'DWH' # for future xDB operator # XSLT:loop: declaration: END} # XSLT:loop: JOB_FLOW_NAME: START{ # XSLT:loop: JOB_FLOW_NAME: END} # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # JOB_TYPE=ODS-MAIN # tmpl_search_path = Variable.get("sql_path") # 	XSLT:loop: JOB_FLOW_NAME-and-PRE_JOB: External:START{{ #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today #    schedule_interval=None, #    execution_delta=None,  # Same day as today # 	XSLT:loop: JOB_FLOW_NAME-and-PRE_JOB: External: END}} # XSLT:loop: JOB_FLOW_NAME: START{ # 	XSLT:loop: Rows-by-JOB_FLOW_NAME: JOB_NAME: START{{ # 	 	FLOW: D_ODS_PRD_SRC.MTL_SYSTEM_ITEMS_B # 	XSLT:loop: Rows-by-JOB_FLOW_NAME: JOB_NAME: START{{ # 	 	FLOW: D_SDM_PRD.SDM_PLM_CATEGORY # 	XSLT:loop: Rows-by-JOB_FLOW_NAME: JOB_NAME: START{{ # 	 	FLOW: D_DM_PRD.FCT_PROD_DEV_MLST_DELAY_RATE