Comments (2)
I changed the content of the python file to:
# from airflow import DAG
# import dagfactory
import os
CUR_DIR = os.path.abspath(os.path.dirname(__file__))
print(CUR_DIR)
# dag_factory = dagfactory.DagFactory(f"{CUR_DIR}/configs/config.yaml")
# dag_factory.clean_dags(globals())
# dag_factory.generate_dags(globals())
# Temporary to check if loading config works with same path.
with open(f"{CUR_DIR}/configs/config.yaml", "r") as stream:
try:
import yaml
configYaml = yaml.safe_load(stream)
print(configYaml)
except yaml.YAMLError as exc:
print(exc)
And executed the file from the Docker shell and got the desired output:
/opt/airflow/dags
{'example_dag1': {'default_args': {'owner': 'example_owner', 'start_date': datetime.date(2018, 1, 1), 'end_date': datetime.date(2018, 1, 5), 'retries': 1, 'retry_delay_sec': 300}, 'schedule_interval': '0 3 * * *', 'concurrency': 1, 'max_active_runs': 1, 'dagrun_timeout_sec': 60, 'default_view': 'tree', 'orientation': 'LR', 'description': 'this is an example dag!', 'tasks': {'task_1': {'operator': 'airflow.operators.bash_operator.BashOperator', 'bash_command': 'echo 1'}, 'task_2': {'operator': 'airflow.operators.bash_operator.BashOperator', 'bash_command': 'echo 2', 'dependencies': ['task_1']}, 'task_3': {'operator': 'airflow.operators.bash_operator.BashOperator', 'bash_command': 'echo 3', 'dependencies': ['task_1']}}}}
from dag-factory.
we are also facing the same issue, did you get any workaround to get this resolved.
from dag-factory.
Related Issues (20)
- Replace `make` to hatch
- Add pre-commit config and run it in CI
- Enable Unit test for Python 3.11 and 3.12
- Add integration tests
- Improve code coverage
- Represent the Airflow Python vs YML DAG feature better way HOT 1
- Decide the minimum Airflow supported version
- Review open PR
- Measure adoption HOT 2
- Increase project quality HOT 2
- Data access in task_name.output when expanding HOT 1
- Add support for templating in `on_failure_callback` HOT 1
- PoC evaluate alternatives of identifying, in Airflow, a DAG was created with DAG Factory HOT 2
- DAG Factory 0.21.0
- Solve critical issues
- Simplify the DAG-instantiation process HOT 2
- [Feature] Add Scarf-based Telemetry to DAG-Factory HOT 2
- Using dag-factory with Astro Python SDK HOT 1
- how to save generated dag python script to a file instead of globals
- Release DAG Factory 0.20.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dag-factory.