Materialized Views which are in Database are not Visible at Metadata Level?

Hi Team Helical,

I am using Helical Insight 3.1 and using Postgress latest 11 version. There are materialized views which are present in the DB but they are not visible at the metadata level. Please advise how could we see that?

Thank You

1 Like

Hi Marc,

Wherever you have installed Helical Insight navigate to DBconfig folder and open the file “postgresql.efwd” in notepad++ or any other text editor.
For example in my case the path is “C:\Program Files\Helical Insight\hi\hi-repository\System\Admin\DbConfig”

Once opened in notepad++ (or any other text editor) navigate to datamap id 1.

Inside that within the cdata replace that with the below, delete older content(generally present near line no 13)

{"catalog":${catalogs},"schema":${schemas},"table":["TABLE","MATERIALIZED VIEW"],"tablePattern":""}

Here you can see we have also added a materialized view.

The second step is to navigate to data map id 3 and in the cdata tag put the below delete the older content (generally present near line no 49).

SELECT table_name as tables,table_schema as schemas, table_catalog as catalogs FROM information_schema.tables 
WHERE table_schema = ${schemas} and table_catalog=${catalog}
UNION
SELECT matviewname as tables,${schemas} as schemas, ${catalog} as catalogs FROM pg_matviews where schemaname = ${schemas}

Save the file. Then restart the server (steps to restart mentioned earlier) and you will be able to see the materialized view also.

Thank You
Team Helical.