Hi Mark, I suppose that the views cannot be discovered automatically so you will have to register them explicitly. If you are connecting to Postgres using the JsonModel then you might find the tests in MaterializationTest [1] useful. Most likely you will have to change the SchemaFactory to use the one related to JdbcSchema [2].
Best, Stamatis [1] https://github.com/apache/calcite/blob/16f518b359cdf529d5bbe42cd5e8663001030d14/core/src/test/java/org/apache/calcite/test/MaterializationTest.java#L129 [2] https://github.com/apache/calcite/blob/16f518b359cdf529d5bbe42cd5e8663001030d14/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java#L497 On Fri, Apr 5, 2019 at 4:00 PM Mark Pasterkamp <[email protected]> wrote: > Dear all, > > I have connected my postgresql database as a datasource to calcite. I am > however not able to find out how I can expose the existing materialized > views in postgres to calcite. I am unable to find much help on the internet > so if anyone is knowledgeable about this I would really appreciate a small > code example as to how this is supposed to work in Java. > > > Mark >
