uhyonc / HueTemplateEvaluator


Version: 0.1+744465e updated

Summary: Evaluate the text field in Hue as a template

License: MIT; https://opensource.org/licenses/MIT

Adds a button to Hue notebook which allows you to evaluate a Handlebars template to autogenerate queries based on a template.
You can use both {{var}} or ${var} for variable replacement. The context portion is evaluated as JSON that is to be passed to the template.
It currently supports the daterange helper, which is useful for generating one query for each day. e.g.

"comment":"This works!"

-- ${comment}
{{#daterange 20170320 -60}}
select * from ${../schema}.mytable where dt='${day}';
You can use other Handlebar constructs as well.

Rating: 0