Example Ranger audit logs
A working example of creating an external table of Ranger audit logs.
CREATE EXTERNAL TABLE audit_logs_ranger
(
evtTime string,
access string,
enforcer string,
resource string,
result int,
action string,
reason string,
resType string,
reqUser string,
cluster string,
cliIP string,
id string,
seq_num int
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
LOCATION '[SOME_DIRECTORY_PATH]';