Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

apigee-proxy-generator - decouple bigquery

Hi team / @dchiesa1 

I have a question in apigee-proxy-generator

Based on the documentation, I think this tool is tight-coupled with Big query based backends... My use case warrants me to create a template that can cater to any type of backends (soap/rest/graphql). Is there a way to use this tool without bigquery?

 

Thanks

Solved Solved
2 3 318
1 ACCEPTED SOLUTION

Hi Nanda

It is not tightly coupled to BQ backends. It just so happens that I built the templates to all use BQ backends, but you can specify any backend you like. 

The job is yours to create the right template to plugin to whatever backends you like. 

Stepping back, that generator tool takes two inputs: 

  • a template
  • some data 

...and produces an API proxy by evaluating the template with the given data. 

The templates I wrote use BQ.  But the tool itself is general. It makes no assumptions about the proxy template, or the target type, etc. 

What is specific to BQ in that example?  If you look int he templates I created, they have some AssignMessage policies that create the post body that is required to send to BQ for a query.  If you had some other kind of backend, you would need to replace those policies (and the surrounding ones) with the logic that would be appropriate for your backend. 

In actuality, the generator tool is ... pretty simple, actually.  It just walks a directory tree containing an exploded API Proxy bundle , and treats each independent file as a template, and evaluates each one, then wraps all that up into a zipped API proxy bundle.  

A significant part of the work, if you were to use this tool, would be creating your own templates for your own specific backends. 

I hope this clarifies things! 

 

View solution in original post

3 REPLIES 3

Hi Nanda

It is not tightly coupled to BQ backends. It just so happens that I built the templates to all use BQ backends, but you can specify any backend you like. 

The job is yours to create the right template to plugin to whatever backends you like. 

Stepping back, that generator tool takes two inputs: 

  • a template
  • some data 

...and produces an API proxy by evaluating the template with the given data. 

The templates I wrote use BQ.  But the tool itself is general. It makes no assumptions about the proxy template, or the target type, etc. 

What is specific to BQ in that example?  If you look int he templates I created, they have some AssignMessage policies that create the post body that is required to send to BQ for a query.  If you had some other kind of backend, you would need to replace those policies (and the surrounding ones) with the logic that would be appropriate for your backend. 

In actuality, the generator tool is ... pretty simple, actually.  It just walks a directory tree containing an exploded API Proxy bundle , and treats each independent file as a template, and evaluates each one, then wraps all that up into a zipped API proxy bundle.  

A significant part of the work, if you were to use this tool, would be creating your own templates for your own specific backends. 

I hope this clarifies things! 

 

Thanks @dchiesa1 - I understand...

If it so happens that a future upgrade of the apigee control plane changes the XML structure (xsd), these template files have to be changed right?

 

Yes that is correct.  If Apigee changes the XML structure, you would need to change your templates. 

But let me comment on the premise.  Apigee has been in the market for ~12 years and the XML structure has not changed. Changing it now would affect many customers, all of the existing customers. so I think it's unlikely to happen.