-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vdk-dag: improve DAGs docs and example (#1984)
What: Improve DAGs user-facing documentation and example based on the feedback and discussions with users. The feedback we got from users is: - The Requirements section in the example links VDK DAGs to the VEP, it should rather link to the README. > Addressed. - Would it be possible to run the example with a DB of choice or am I required to use Trino? > Addressed. - The team name has to be added on several occasions and this could lead to some consistency issues. > Addressed. - The DAG-specific configuration variables are not very visible in the README. > Addressed. Signed-off-by: Yoan Salambashev <ysalambashev@vmware.com>
- Loading branch information
Showing
15 changed files
with
146 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,61 @@ | ||
# Copyright 2021-2023 VMware, Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
from vdk.plugin.meta_jobs.meta_job_runner import MetaJobInput | ||
from vdk.plugin.dag.dag_runner import DagInput | ||
|
||
|
||
JOBS_RUN_ORDER = [ | ||
{ | ||
"job_name": "ingest-job-table-one", | ||
"team_name": "my-team", | ||
"fail_meta_job_on_error": True, | ||
"fail_dag_on_error": True, | ||
"arguments": { | ||
"db_table": "test_dag_one", | ||
"db_schema": "default", | ||
"db_catalog": "memory", | ||
}, | ||
"depends_on": [], | ||
}, | ||
{ | ||
"job_name": "ingest-job-table-two", | ||
"team_name": "my-team", | ||
"fail_meta_job_on_error": True, | ||
"fail_dag_on_error": True, | ||
"arguments": { | ||
"db_table": "test_dag_two", | ||
"db_schema": "default", | ||
"db_catalog": "memory", | ||
}, | ||
"depends_on": [], | ||
}, | ||
{ | ||
"job_name": "read-job-usa", | ||
"team_name": "my-team", | ||
"fail_meta_job_on_error": True, | ||
"fail_dag_on_error": True, | ||
"arguments": { | ||
"db_tables": ["test_dag_one", "test_dag_two"], | ||
"db_schema": "default", | ||
"db_catalog": "memory", | ||
}, | ||
"depends_on": ["ingest-job-table-one", "ingest-job-table-two"], | ||
}, | ||
{ | ||
"job_name": "read-job-canada", | ||
"team_name": "my-team", | ||
"fail_meta_job_on_error": True, | ||
"fail_dag_on_error": True, | ||
"arguments": { | ||
"db_tables": ["test_dag_one", "test_dag_two"], | ||
"db_schema": "default", | ||
"db_catalog": "memory", | ||
}, | ||
"depends_on": ["ingest-job-table-one", "ingest-job-table-two"], | ||
}, | ||
{ | ||
"job_name": "read-job-rest-of-world", | ||
"team_name": "my-team", | ||
"fail_meta_job_on_error": True, | ||
"fail_dag_on_error": True, | ||
"arguments": { | ||
"db_tables": ["test_dag_one", "test_dag_two"], | ||
"db_schema": "default", | ||
"db_catalog": "memory", | ||
}, | ||
"depends_on": ["ingest-job-table-one", "ingest-job-table-two"], | ||
}, | ||
] | ||
|
||
|
||
def run(job_input): | ||
MetaJobInput().run_meta_job(JOBS_RUN_ORDER) | ||
def run(job_input) -> None: | ||
DagInput().run_dag(JOBS_RUN_ORDER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vdk-dag |
Oops, something went wrong.