Created
March 1, 2023 21:42
-
-
Save cra/33fb6f612c4abf29e2a8cf19ecb995cd to your computer and use it in GitHub Desktop.
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
import os | |
import pendulum | |
from airflow import DAG | |
from airflow.decorators import dag | |
from airflow.operators.empty import EmptyOperator | |
from airflow.operators.bash import BashOperator | |
base_path = os.path.dirname(os.path.abspath(__file__)) | |
file_path = os.path.join(base_path, 'YM_logs') | |
@dag( | |
schedule_interval=None, | |
start_date=pendulum.datetime(2023, 3, 1), | |
catchup=False | |
) | |
def dobroy_nochi_boris(): | |
start = EmptyOperator(task_id='start') | |
task1 = BashOperator( | |
task_id='preved', | |
bash_command=f''' | |
echo ${{AIRFLOW_HOME}} --path {file_path}''' | |
) | |
start >> task1 | |
_ = dobroy_nochi_boris() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment