Pelle, Thanks for your explanation. With your help I become close to
understand what it is. The following code is that I've tested. It might be
good to generate simple HQL syntax, but I am not sure of generating many
templates case by case. As it is very simple templete engine, I am still
thinking how to coordinate other stuffs to make it easy to use.
<html>
<head>
<script type="text/javascript" src="
https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.2.1/mustache.min.js"
></script>
<script>
var view = {
db_name : "skp",
table_name : "member"
};
function loadtemp(){
var output = Mustache.render("INSERT OVERWRITE
{{db_name}}.{{table_name}}", view);
document.getElementById('dml').innerHTML = output;
}
</script>
</head>
<body onload="loadtemp()" >
<!-- reference:
https://www.sitepoint.com/creating-html-templates-with-mustachejs/ -->
<p id="dml"></p>
</body>
</html>
2016-10-31 20:29 GMT+09:00 ganesh raman <[email protected]>:
> Has anyone tried https://github.com/sakserv/hadoop-mini-clusters/blob/
> master/README.md. ?
>
> It appears to have mini oozie in it and even had an example.
>
>
> We use mini cluster like harness for integration tests and those are quite
> useful too
>
> Thanks/Ganesh
>
> -----Original Message-----
> From: "Per Ullberg" <[email protected]>
> Sent: 10/31/2016 4:21 PM
> To: "[email protected]" <[email protected]>
> Subject: Re: Opinion gathering Oozie job development platform
>
> Goun na: Here you go: https://mustache.github.io/
>
> In short mustache is a very simplistic template fwk with very limited
> features. The limited feature set keeps the templates clean and readable
> but off course instead transfers the complex logic to the model that is fed
> to the template. The good thing about that is that the model code is easy
> to unit test while templates are not.
>
> Here is a typical example of a hive sql template that we use to generate a
> "add-partition-statement"
>
> ALTER TABLE ${hiveconf:TARGET_SCHEMA_NAME}_STREAMING.`{{tableName}}`
> ADD PARTITION
> {{^partitions.isEmpty}}
> (
> {{#partitions}}{{name}}{{^isLast}}, {{/isLast}}{{/partitions}}
> )
> {{/partitions.isEmpty}};
>
>
> The {{...}} stuff is mustache syntax.
>
>
>
> regards
> /Pelle
>
> On Mon, Oct 31, 2016 at 10:50 AM, goun na <[email protected]> wrote:
>
> > Dear Pelle,
> >
> > Where to refer to fully understand mustache templates? Unfortunately, I
> am
> > not a proficient java developer.
> >
> > 2016-10-31 18:32 GMT+09:00 Per Ullberg <[email protected]>:
> >
> > > Hi,
> > >
> > > We use intellij but with no explicit oozie support. We materialize a
> lot
> > of
> > > oozie jobs using mustache templates. We write junit tests using XPath
> to
> > > verify simple stuff like action sequence etc.
> > >
> > > I would love to see a tool that could lint and also run your workflow
> in
> > a
> > > local test environment with test input.
> > >
> > > /Pelle
> > >
> > > On Mon, Oct 31, 2016 at 10:27 AM, goun na <[email protected]> wrote:
> > >
> > > > Hi users,
> > > >
> > > > I've been 100 percent dependent on VI editor to develop oozie
> > > > workflows/coordinators, but as jobs are increasing many people are
> > > > involving developing jobs, I become look into the capability of
> Eclipse
> > > > with Oozie Plugin. So far, it seems its focus is basic workflow
> > > > visualization. How do you develop oozie jobs? I would like to gather
> > all
> > > > users experience of it.
> > > >
> > > > Thanks,
> > > > Goun Na
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > *Per Ullberg*
> > > Data Vault Tech Lead
> > > Odin Uppsala
> > > +46 701612693 <+46+701612693>
> > >
> > > Klarna AB (publ)
> > > Sveavägen 46, 111 34 Stockholm
> > > Tel: +46 8 120 120 00 <+46812012000>
> > > Reg no: 556737-0431
> > > klarna.com
> > >
> >
>
>
>
> --
>
> *Per Ullberg*
> Data Vault Tech Lead
> Odin Uppsala
> +46 701612693 <+46+701612693>
>
> Klarna AB (publ)
> Sveavägen 46, 111 34 Stockholm
> Tel: +46 8 120 120 00 <+46812012000>
> Reg no: 556737-0431
> klarna.com
>