-
Hi all, I am using dagster for crawling/harvesting data from many URLs for constructing a knowledge graph
I am using jinja2 to dynamically generate each function decorated with
I found this easy to reason about, but am unclear if it is optimal
Thank you! (And if anyone has dagster projects that dynamically generate their own runtime code I would be very interested!) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
And just as an fyi, I have seen https://docs.dagster.io/concepts/ops-jobs-graphs/dynamic-graphs but I am unclear if dynamic graphs generated at runtime are strictly better than generated code via templating |
Beta Was this translation helpful? Give feedback.
Hi Colton, nice to meet you! Fellow Colton here -
Your approach is interesting, and does solve the problem, but I think there are a few considerations in which dynamic graphs may have some benefit, and I'd encourage you to explore them.
Like you said, your current approach is a two-step process. First, you generate the files, and then you can orchestrate them using Dagster. I believe this introduces an unnecessary overhead and forces the user to require additional maintenance of these files, when they could likely be generated dynamically in Dagster itself. You would have the same parameters that you are using to generate the files, however, they will be used as input to your dynamic grap…