Skip to content

Instantly share code, notes, and snippets.

@amacal
Created November 21, 2020 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amacal/7a4ed5e95e2e231b1b2d5a6ed80ab282 to your computer and use it in GitHub Desktop.
Save amacal/7a4ed5e95e2e231b1b2d5a6ed80ab282 to your computer and use it in GitHub Desktop.
def worker_ftp(name, host, directory, bucket, input, output):
pipeline = Pipeline(name=name, steps=[
FtpDownload(host=host, directory=directory),
S3Upload(bucket=bucket, key=output, chunksize=128*1024*1024)
])
pipeline.start(input=input)
def worker_json(name, bucket, input, output):
pipeline = Pipeline(name=name, steps=[
S3Download(bucket=bucket),
Ungzip(),
XmlToJson(rowtag='logitem'),
S3Upload(bucket=bucket, key=output, chunksize=128*1024*1024)
])
pipeline.start(input=input)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment