Skip to main content
Question

HTTP Export

  • May 4, 2023
  • 1 reply
  • 1 view

elghali
Forum|alt.badge.img+1

Hello, is there a way to send the result of an sql query through and HTTP POST request with vertica, something like the KafkaExport method but via HTTP

1 reply

Bryan_H
Forum|alt.badge.img+2
  • Participating Frequently
  • May 4, 2023

There is not a built-in way to do this, but I can think of a few ways to implement:
Within Vertica, develop a UDTF that will send rows via HTTP POST. KafkaExport is itself a C++ UDTF. See documentation at https://docs.vertica.com/12.0.x/en/extending/developing-udxs/transform-functions-udtfs/
Outside Vertica, use command-line tools to run SQL and pipe to HTTP POST, e.g. vsql -c | curl -H "Content-Type: text/csv" -X POST --data-binary @- http://api
There may be third-party ETL or batch tools that can also push SQL results over HTTP POST.
You can also submit a feature request via support or your account team.