question

mohmmad.m.aburadeh_143075 avatar image
mohmmad.m.aburadeh_143075 asked mohmmad.m.aburadeh_143075 commented

Is it possible to create a TRIGGER on SELECT operation?

Hi,

I want to create a trigger on the Cassandra table for the SELECT operation.
The idea is when we do SELECT and the data does not exist in the table, we need the trigger to load data from a file into the table, maybe by executing a java code that takes care of the loading from the file into the table. But we need the trigger to be executed on the select operation.
Can you please help ASAP?

Thanks

triggers
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered mohmmad.m.aburadeh_143075 commented

No, it is not possible to create a TRIGGER on reads.

Triggers are designed for reacting to and/or augmenting writes. Coordinator nodes execute triggers before applying mutations, not read requests. Cheers!

1 comment Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

mohmmad.m.aburadeh_143075 avatar image mohmmad.m.aburadeh_143075 commented ·

Thanks a lot, @Erick Ramirez

0 Likes 0 ·