Last active
January 16, 2024 09:36
-
-
Save kapilgarg/02d8251987deafa1e6c284135536351b 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
from airflow.decorators import dag,task | |
import pendulum | |
import airflow1 | |
@dag(dag_id='dag_tutorial_1', schedule=None, start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),catchup=False,tags=["example"],) | |
def airflow_dag_tutorial(): | |
@task | |
def get_stock_price(): | |
return airflow1.get_stock_price() | |
@task | |
def clean(filepath): | |
return airflow1.clean(filepath) | |
@task | |
def compute(filepath): | |
return airflow1.compute(filepath) | |
output_path = get_stock_price() | |
clean_data = clean(output_path) | |
corr_matrix = compute(clean_data) | |
airflow_dag_tutorial() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment