Hello Team, I'm working on a use case that involve...
# questions
t
Hello Team, I'm working on a use case that involves creating n nodes based on a tuning parameter x. Currently, we're using a Jinja template for this purpose. However, since I'm planning to migrate to Kedro 0.19, I need to implement this without using Jinja. Currently, we achieve this using loops in Python. For example: _*Node_A_{n}, where n ranges from 1 to x.*_ I'm exploring if there's a more efficient way to accomplish this task without relying on Python loops.
n
Hi @tom kurian, why would you need Jinja for creating node in the first place? Can you explain a little bit more how it works?
t
we were doing something like this, in a node.j2 file {% for n in range(i) %} node_a.{{ n }}_some: func: some_function inputs: data: master_table outputs: sample.{{ n }}_tokens_sample
n
Thanks. This looks more like a plugin specific feature so you may have better chance to ask the author about this plugin. You should be able to do this directly in a Python file already. I don't think there are new feature that can help this directly . The dataset factory look kind of similar but they are for the Data Catalog not nodes.
👍 1