Anirudh D
Anirudh D

Reputation: 231

Adding transformations in Sybase replication server

We have primary source database as Oracle 11gR2 and target as SAP HANA. We are trying to test SAP - Sybase Replication server for replication from Primary ORACLE to Target HANA.

We need to add extra columns such as RECORD_DATE and LAST_MODIFIED_DATE to HANA tables. Is it possible to add Transformations or extra columns to target tables which are not present in Primary Database.

Best Regards

Upvotes: 1

Views: 295

Answers (2)

markp-fuso
markp-fuso

Reputation: 35006

I'm assuming you want to capture auditing data for records inserted/updated by the Repserver maintenance user (in the HANA database).

While the column default (for inserts; as discussed with Shivam) will work, for updates you've got a few options:

  • an update trigger on the HANA table [I don't work with HANA so I don't know if this is doable]

  • defining the update column as a (materialized) computed column, with the associated function being responsible for obtaining the current date/time when other columns in the table are modified [while this is doable in Sybase ASE, I don't know if this is doable in HANA]

  • (in repserver) create a custom function string for the rs_update function on this table which emulates a standard rs_update function string with the addition of an update of LAST_MODIFIED_DATE = getdate() (replace getdate() with HANA's equivalent of the current date/time) [there are a couple different ways to do this depending on SRS version, what's doable with HANA-specific function strings, and personal preference - a bit much to go into at this point if a custom function string is going to be out of the question or you've already got an acceptable solution]

Upvotes: 0

Shivam Shrivastava
Shivam Shrivastava

Reputation: 24

are you thinking of adding these fields during replication. or want to merge them after replication. If after replication you want to merge them simply just go to Hana Studio and make an Information view to get the the merged or simply joined data from different tables.

and if that table is not present in the the source System then instead of replication make a Excel flat file and import it into Hana using the Import option on the RHS of hana studio.

and The only way to Alter a table definition in Hana is by Using the Alter Table SQL statement no other Shortcuts. Or just import and make a join.

Upvotes: 0

Related Questions