ClickHouse / clickhouse-jdbc-bridge

A JDBC proxy from ClickHouse to external databases
Apache License 2.0
167 stars 60 forks source link

Doesn't work with materialized view #137

Closed sliontc closed 2 years ago

sliontc commented 2 years ago

I'v tested JDBC engine with materialized view and found out that the view was not refreshed after data inserted into the jdbc table.

Steps:

  1. Create Table test ENGINE = JDBC('msjdbc_keyword', 'dbo', 'NewTable') // the datasource is MS SqlServer
  2. CREATE MATERIALIZED VIEW mv ENGINE = MergeTree AS SELECT * FROM test
  3. Insert into Keyword.dbo.NewTable (name) VALUES('oiljkl')
  4. Select * From mv Result: No data was returned.

So dose that mean the Materialized View is not supported for the JDBC engine?

zhicwu commented 2 years ago

Yes, ClickHouse does not support materialized view over remote table like the one backed by JDBC bridge.

sliontc commented 2 years ago

So any plan on this function? Actually MySQL engine does support.

zhicwu commented 2 years ago

I'm not aware of any plan regarding this. Please feel free to submit a feature request in ClickHouse.

sliontc commented 2 years ago

Thanks.