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 luigi | |
class WritePipelineTask(luigi.Task): | |
def output(self): | |
return luigi.LocalTarget("data/output_one.txt") | |
def run(self): | |
with self.output().open("w") as output_file: |
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 | |
from datetime import datetime, timedelta | |
from airflow import DAG | |
from airflow.operators.bash_operator import BashOperator | |
from airflow.operators.python_operator import PythonOperator | |
OUTPUT_ONE_PATH = "data/output_one.txt") | |
OUTPUT_TWO_PATH = "data/output_two.txt") |
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 luigi | |
NUMBER_OF_FILES = 50 | |
class WritePipelineTask(luigi.Task): | |
def output(self): | |
return luigi.LocalTarget("data/_DONE_WRITE_PIPELINE_TASK") |
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 luigi | |
NUMBER_OF_FILES = 50 | |
class WritePipelineTask(luigi.Task): | |
flow_id = luigi.Parameter() | |
def output(self): | |
return luigi.LocalTarget("data/output_one_{}.txt".format(self.flow_id)) |
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 | |
from datetime import datetime, timedelta | |
from airflow import DAG | |
from airflow.operators.bash_operator import BashOperator | |
from airflow.operators.python_operator import PythonOperator | |
DATA_FOLDER = "data" |