
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to run multiple postgresql refresh materialized views in a given order
Hello,
I am trying to run five
postgresql
refresh materialized views in a particular order.Is it possible to do it using tDBRow component? Please help me understand how
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Could you please have a look at this KB article about mutiple SQL statement's in a BEGIN/END block.
Or you could create a store procedure and call the store procedure with tpostgresqlSP.
Hope it helps.
Best regards
Sabrina

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Could you please have a look at this KB article about mutiple SQL statement's in a BEGIN/END block.
Or you could create a store procedure and call the store procedure with tpostgresqlSP.
Hope it helps.
Best regards
Sabrina

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1-Create a connection with tpostgresqlConnection first (Make sure that the MV are in the schema provided here)
2-Add tJDBCTableList => in Advanced settings use the filter or Regex filter with include ( just put the names of your tables seperated with a "|" for exqmple ("table1|table2|table3") in the order you want)
3- Add an iterate link to your tDBRow
4- Add the SQL query :
"REFRESH MATERIALIZED VIEW " + ((Integer)globalMap.get("tJDBCTableList _1_CURRENT_TABLE"))
Also you can use tforEach => add your MVs there and then use the component variable in your query
