Add jinja templating support to utils.task_wrappers.run
and extractor.metric_runner.MetricRunner
#76
Labels
Milestone
For more modular SQL-writes within the platform, we should enable jinja templating in metrics queries (in
MetricRunner
) & raw queries (inrun
), using templates stored in the~/.whale/templates
folder.Detailed specifications
~/.whale/templates
.~/.whale/templates/my_template
should be able to be added to a query by inserting{% extends my_template.sql %}
, following the Jinja template engine pattern (similar to the pattern found in Django). This will require invocation of ajinja2.FileSystemLoader
with the path~/.whale/templates
given as argument (an example is shown here).utils.task_wrappers.run
andextractor.metric_runner.MetricRunner.extract()
should run the templating engine first, then execute the rendered query.The text was updated successfully, but these errors were encountered: