Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Can I add a custom timestamp column in HBase table which updates whenever a row is inserted/updated?

Highlighted

Can I add a custom timestamp column in HBase table which updates whenever a row is inserted/updated?

New Contributor

The data is sourced from a different system and is loaded into an HBase table using a replication process.

The target table in Hbase is called Hbasetbl1

Can I create a custom column "HBase_Created_Date" which creates the timestamp of when a row is inserted/updated in this target table?

Example:

Source table: tbl1

IdNameCreated_DateUpdated_Date
1Abc01-04-2019 14:0001-04-2019 14:10

Let's say the replication process, brings in the source row to HBase at 14:30

Target Table: Hbasetbl1

IdNameCreated_DateUpdated_DateHBase_Created_Date
1Abc01-04-2019 14:0001-04-2019 14:1001-04-2019 14:30
1 REPLY 1

Re: Can I add a custom timestamp column in HBase table which updates whenever a row is inserted/updated?

You would have to develop a custom ReplicationEndpoint in which you add this new column on every row being replicated.

https://hbase.apache.org/devapidocs/org/apache/hadoop/hbase/replication/ReplicationEndpoint.html