Skip to main content

Modular quering

  • February 4, 2015
  • 1 reply
  • 9 views

Anton_Kiselev
Hi everybody,

I want to make my queries more modular. I have a query with parameters that I want to use in other queries. Moreover I want to let people work on the first query (change the calculations inside and keep the "interface") while I'm working on the derived ones.

So I need something like view with parameters. In sql server it could be implemented as table-valued function or stored procedure.

Is there any way to do it in Vertica?

1 reply

David_Rydzewski
  • Participating Frequently
  • February 4, 2015
This is a bit hacky, but you could create a java transform UDF with defined inputs. That java UDF builds a SQL string based on the inputs, connects back to Vertica over JDBC (inside the UDF), and return results as a table from the UDF.