[ https://issues.apache.org/jira/browse/RANGER-4809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Madhan Neethiraj updated RANGER-4809: ------------------------------------- Parent: (was: RANGER-4748) Issue Type: Improvement (was: Sub-task) > Utility to migrate admin audit logs in x_trx_log table x_trx_log_v2 table > ------------------------------------------------------------------------- > > Key: RANGER-4809 > URL: https://issues.apache.org/jira/browse/RANGER-4809 > Project: Ranger > Issue Type: Improvement > Components: admin > Reporter: Madhan Neethiraj > Priority: Major > > With updates in RANGER-4803, Ranger will store admin audit records in > {{x_trx_log_v2}} table. Prior to this, {{x_trx_log}} table was used to store > these records. To make earlier admin audits available to updated Ranger, > existing entries in {{x_trx_log}} should be migrated to {{x_trx_log_v2}} > table. Here are few notes to take into account: > # For a given admin action, like create/update/delete of a policy, multiple > rows are created in {{x_trx_log}} table - one row for each updated attribute. > # For a given admin action, a single row is created in {{x_trx_log_v2}} > table. This row captures details of all updated attributes in json format. > # Migration utility should merge all rows for a given admin action, > identified by column {{x_trx_log.trx_id}}, into a single record in > {{x_trx_log_v2}} table. {{x_trx_log_v2.change_info}} column should be > populated with contents of following columns in multiple {{x_trx_log}} rows: > {{attr_name}}, {{prev_val}}, {{new_val}}. > # The utility should provide an option to migrate only a subset of entries in > {{x_trx_log}} table - for example, for a given time period (last 3 months, > last 1 year). This will help avoid migrating older records that are of no > interest to the customer. -- This message was sent by Atlassian Jira (v8.20.10#820010)