It's possible read data from Elasticsearch to postgres inside a pgsql function? How?

HI

it's possible read data from elasticsearch "inside" a pgsql function (i need read some data and write them in a DB Table (postgres)).

all the information i finded is about write data from postgres DB to ElasticSearch. But I need the opposite. It's possible in a DB pgsql function? How???

We have the index inside the elastic. So, I only need to connect me with the elastic inside the pgsql function.

thanks

mj

May be you can extract the data from elasticsearch using logstash and the elasticsearch input.

But AFAIK, there is no jdbc output available. (Might be something useful to ask though).

For now, you can export to CSV with the output-csv filter. Then use whatever import tool you have to insert into Postgresql.

HTH

Thanks :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.