Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

avatar
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

avatar
Super Guru

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