From 4b2e9baa403aa34863a9c991ad15c66c9668cb73 Mon Sep 17 00:00:00 2001 From: Eduardo Lauer Date: Tue, 27 Aug 2024 17:35:15 -0300 Subject: [PATCH] Add syspath for schemas and change dag.owners to string --- src/dou_dag_generator.py | 2 +- src/parsers.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dou_dag_generator.py b/src/dou_dag_generator.py index 5374ab0..3965ad8 100755 --- a/src/dou_dag_generator.py +++ b/src/dou_dag_generator.py @@ -387,7 +387,7 @@ def create_dag(self, specs: DAGConfig, config_file: str) -> DAG: doc_md = self.prepare_doc_md(specs, config_file) if specs.doc_md else None # DAG parameters default_args = { - "owner": specs.owner, + "owner": ",".join(specs.owner), "start_date": datetime(2021, 10, 18), "depends_on_past": False, "retries": 10, diff --git a/src/parsers.py b/src/parsers.py index f895c23..c41cfae 100644 --- a/src/parsers.py +++ b/src/parsers.py @@ -1,14 +1,17 @@ """Abstract and concrete classes to parse DAG configuration from a file.""" -# from dataclasses import dataclass import json import textwrap +import os +import sys + from typing import List, Tuple import yaml from airflow import Dataset from airflow.models import Variable +sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) from schemas import RoDouConfig, DAGConfig