Created
September 26, 2016 20:22
-
-
Save swegner/6df00df1423b48206c4ab5a7e917218a 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 __future__ import absolute_import | |
import logging | |
import apache_beam as beam | |
from apache_beam.utils.options import PipelineOptions | |
from apache_beam.utils.options import SetupOptions | |
from apache_beam.utils.options import StandardOptions | |
def run(): | |
options = PipelineOptions() | |
options.view_as(SetupOptions).requirements_file = 'requirements.txt' | |
options.view_as(StandardOptions).runner = 'DataflowPipelineRunner' | |
p = beam.Pipeline(options=options) | |
p | beam.Create(['foo', 'bar']) | |
p.run() | |
if __name__ == '__main__': | |
logging.getLogger().setLevel(logging.INFO) | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment