> Does Teiid have some functionality i could use?
As long as the insert/update/delete is processed through Teiid you have a couple of options. If you need row level handling you could instead direct the update through a view and use instead of triggers.
create view tbl as select * from physical.tbl;
create trigger on tbl instead of insert as
for each row
--do the solr update, then the actual insert
insert into tbl values (new.col1, new.col2 ...);
Note this can impact the performance of updates that otherwise could get fully pushed to a source - but it will be optimized out completely for selects.
Another other option be log an enhancement for exposing data events at the row or table level to a Java api that you can register listeners with.
If you need to update the search index based upon updates made outside of Teiid you'd have to look into CDC options, such as Debizium.
Thank you for options you provided. I'm interested mostly in CDC option. However if i understand it correctly one have to setup plugin in remote database which allow Debizium to work. Do you know about some solution which can work without remote database cooperation (plugins, settings, ...)? Ideally something universal as JDBC, not Postgres specific. If it doesn't exist - is my best option to regularly index remote database by CRON or something?
1 of 1 people found this helpful
> However if i understand it correctly one have to setup plugin in remote database which allow Debizium to work.
That is correct for a Postgresql backend. Other sources Debezium supports require some configuration but are less invasive.
> Do you know about some solution which can work without remote database cooperation (plugins, settings, ...)?
Most will require some db settings, processing of transaction logs, configuration of where to publish events, etc. Otherwise you'd have to have some kind of protocol gateway or require clients to use specialized drivers, either way there's a lot logic that would need to go into understanding the statements and transaction boundaries - so it ends up being much easier to do CDC with some level of backend integration.