这是我的问题的一个很好的部分答案: Luigi flexible pipeline and passing parameters all the way through
我有相同的管道,但我想用自定义配置(不 luigi.cfg)配置它
/ taskC -> taskB -> taskA
- taskC -> taskB -> taskA
\ taskC -> taskB -> taskA
配置文件如下:
[servername]
username=name
password=password
[servername2]
username=name2
password=password2
[servername3]
username=name3
password=password3
所以我开始这样:
class configure(luigi.WrapperTask):
configname = luigi.Parameter()
def run(self):
with self.input().open('r') as file ini:
for i in sections:
# read section from ini
def requires(self):
tasks = []
# here I also need for-loop
return tasks
请帮助实施: FOR-LOOP 1.读取ini文件 2.阅读下一节 3.做工作流程 转到1 / for循环