GitHub user carloea2 added a comment to the discussion: Proposal: Unify Macro & Template
I think this unification starts from the wrong premise. A **Macro is a workflow**: it contains operators and their connections. Whether that graph runs independently or is embedded inside another workflow changes how it is used, not what it is. In my opinion, a macro should not be distinguishable from a workflow therefore no need for macro concept. A **Template is not a graph**. It is a reusable set of property values that can be applied to compatible workflows. For example, suppose two completely different workflows both contain a CSV Reader. A template could specify: `CSVReader.file = "control-patients.csv"` That template can configure both workflows without knowing, or caring, how their DAGs are connected. The workflows can be rearranged, extended, or have operators removed. The template remains an independent configuration; properties without a matching operator are simply not applied. I would also like templates to be selectable directly from the workflow canvas. This would let users switch the same workflow between different contexts without changing its structure. For example, a biological-analysis workflow could offer: * **Control Cohort Template** * Input file: `control-patients.csv` * Significance threshold: `0.05` * Output: `control-results` * **Treatment Cohort Template** * Input file: `treatment-patients.csv` * Significance threshold: `0.01` * Output: `treatment-results` Selecting a different template on the canvas would update those properties while leaving the DAG untouched. The same templates could also be applied to other compatible workflows. The distinction is simple: * **Macros (workflows) reuse computation and structure.** * **Templates reuse configuration and context.** These concepts are orthogonal, not special cases of each other. A template could be applied to a regular workflow or to a macro. Treating a template as a runnable macro unnecessarily ties configuration to one particular DAG and removes the valuable ability to reuse and switch configurations across different workflows. TL;DR: **Configured workflow=Workflow graph+Template properties** GitHub link: https://github.com/apache/texera/discussions/7368#discussioncomment-17949434 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
