Added optional passing of one or multiple environment variables via --env flag to the bonobo cli.

This commit is contained in:
cwandrews
2017-09-18 15:24:27 -04:00
parent 5a6e65ee77
commit 8b9dac50ec
3 changed files with 60 additions and 1 deletions

View File

@ -0,0 +1,22 @@
import os
from bonobo import Graph
def extract():
env_test_user = os.getenv('ENV_TEST_USER')
env_test_number = os.getenv('ENV_TEST_NUMBER')
env_test_string = os.getenv('ENV_TEST_STRING')
return env_test_user, env_test_number, env_test_string
def load(s: str):
print(s)
graph = Graph(extract, load)
if __name__ == '__main__':
from bonobo import run
run(graph)