Files
bonobo/examples/basic_extract_transform_load_of_strings.py
Romain Dorgueil e7a5fe3eed marked wip as such
2016-12-09 09:59:58 +01:00

28 lines
417 B
Python

from bonobo.core.graph import Graph
from bonobo.core.strategy import NaiveStrategy, ExecutorStrategy
def extract():
yield 'foo'
yield 'bar'
yield 'baz'
def transform(s):
return s.title()
def load(s):
print(s)
if __name__ == '__main__':
etl = Graph()
etl.add_chain(extract, transform, load)
s = NaiveStrategy()
s.execute(etl)
s = ExecutorStrategy()
s.execute(etl)