Skip to Main Content
Preset Feature Feedback
Status Needs review
Categories Enhancement
Created by Marko Stefanovic
Created on Apr 27, 2023

Allow creating and storing personal Jinja macros for re-use

It would be useful to have some way to save Jinja macros, and to be able to call them from datasets. If I'm correct, this is possible when self-hosting Superset, macros can be defined within one file and they can be called from Superset.

This can be very useful for making SQL code reusable, for example, if I have 5 datasets and they are all using a same certain part of SQL code, when I have to make a change on that part of SQL I need to change it in all datasets - but if instead of that code I had a Jinja macro which contained that SQL code I would need to only make a change in one place.

  • Attach files