Connect ChartFactor to Postgres as well as Elasticsearch


#1

Hi there, is it possible to hook ChartFactor to connect to Postgres as well as Elasticsearch in an app?

Let me explain my scenario. Right now, we use ChartFactor for all visualizations with the data in Elasticsearch, including the Raw Data Table with column filters which we love.
We also have some small tables, mainly metadata, in Postgres and really want to use the ChartFactor table for those as well to leverage its filtering capabilities out of the box. Is that possible?


#2

Hi @dmitry, yes, completely possible with minimum effort.

You need to expose the tables you’d like to use over a REST API so that CharFactor can render them. Here is the reference implementation: https://github.com/Aktiun/postgres-rest. Please see its README file to set it up, including a PG docker instance and seed data for testing.

Then, simply use the Redshift & PostgreSQL data provider as described in this page: https://chartfactor.com/doc/latest/data_providers/redshift%26postgres/ to point to your API.

From there on, you can visualize your PG tables using the Raw Data Table and any other ChartFactor visualization.