Last active
July 9, 2017 16:51
-
-
Save wkerzendorf/395c85a2955002412be302d708329f7f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
from glob import glob | |
import os | |
raw_zips = '/1002/*.gz' | |
class ExtractGZ(luigi.Task): | |
document_id = luigi.Parameter() | |
def output(self): | |
return luigi.LocalTarget(self.document_id + '.txt') | |
def run(self): | |
print os.path.dirname(self.document_id) | |
class TestTask(luigi.WrapperTask): | |
def requires(self): | |
for fname in glob(raw_zips): | |
#print fname | |
yield ExtractGZ(fname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment