-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
034ded1
commit 637b923
Showing
1 changed file
with
42 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from airflow.decorators import dag | ||
from kubernetes.client import models as k8s | ||
from operators.datacoves.bash import DatacovesBashOperator | ||
|
||
# Replace with your docker image repo path | ||
IMAGE_REPO = "coldborecapital/vetspire-extractor" | ||
|
||
# Replace with your docker image repo tag, or use "latest" | ||
IMAGE_TAG = "0.0.5" | ||
|
||
default_args = { | ||
"owner": "airflow", | ||
"email": "some_user@exanple.com", | ||
"email_on_failure": True, | ||
"description": "Sample python dag", | ||
} | ||
|
||
TRANSFORM_CONFIG = { | ||
"pod_override": k8s.V1Pod( | ||
spec=k8s.V1PodSpec( | ||
containers=[k8s.V1Container(name="base", image=f"{IMAGE_REPO}:{IMAGE_TAG}")] | ||
) | ||
), | ||
} | ||
|
||
|
||
@dag( | ||
default_args={"start_date": "2021-01"}, | ||
description="k8s_executor", | ||
schedule_interval="0 0 1 */12 *", | ||
tags=["version_6"], | ||
catchup=False, | ||
) | ||
def k8s_executor(): | ||
k8s_executor = DatacovesBashOperator( | ||
task_id="k8s_executor", | ||
executor_config=TRANSFORM_CONFIG, | ||
bash_command=f"python /app/vetspire_extractor/launch_points/launch_extractor.py", | ||
) | ||
|
||
|
||
dag = k8s_executor() |