Hi everyone, I am looking for your feedback or advice on modeling an audit trail log table on Cassandra that stores information from tracking everything an employee changes within the application.
The existing application is being migrated from mysql to Cassandra. Is text the most appropriate data type to store JSON that contain couple of dozen lines ? CREATE TABLE audit_trail ( auditid timeuuid, actiontype text, objecttype text, executedby timeuuid, executedat text, objectbefore text, objectafter text, clientipaddr text, serveripaddr text, servername text, channel text, PRIMARY KEY (auditid) ); auditid // an UUID of the audit log actiontype // create, retrieve, update, delete, approve, activate, unlock, lock etc. objecttype // order, customer, ticket, message,account, paymenttransaction,refund executedby // the UUID of the employee executedat // timestamp when the action happened objectbefore // the json of the object before the change objectafter // the json of the object after the change clientipaddr // the ip address of the client serveripaddr // the server ip address that handled the request servername // the server name that handled the request channel //web, mobile, call center The query requirement is "where executedby = ?”. Will be using Stratio’s Cassandra Lucene Index to support querying/filtering. Thanks! -- IPVP