Data Replication
- Data Replication 9.8.0
- All Products
[TERADATA] [AFTER_APPLY] <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:template match="/"> call tgt_db1.test_proc(<xsl:value-of select="//Cycle/@cycle_id"/>) </xsl:template> </xsl:stylesheet> [END_OF_XSL] [END_OF_DEST]
[TERADATA] [AFTER_APPLY] <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:template match="/"> INSERT INTO tgt_db1.stat1(total_inserts) VALUES (<xsl:value-of select="sum(//Mapping/@inserts)"/>); INSERT INTO tgt_db1.stat2(total_updates) VALUES (<xsl:value-of select="sum(//Mapping/@updates)"/>); INSERT INTO tgt_db1.stat3(total_deletes) VALUES (<xsl:value-of select="sum(//Mapping/@deletes)"/>); </xsl:template> </xsl:stylesheet> [END_OF_XSL] [END_OF_DEST]
The first INSERT statement inserts the date and time of an apply cycle and the number of tables that are processed during the apply cycle into the STAT1 table. The second INSERT statement inserts the total number of Inserts, Updates, and Deletes that are processed during an apply cycle into the STAT2 table.[ORACLE] [AFTER_APPLY] <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:template match="/"> BEGIN INSERT INTO tgt_db1.STAT1 VALUES (sysdate,<xsl:value-of select="count(//Mapping)"/>); INSERT INTO tgt_db1.STAT2 VALUES (<xsl:value-of select="sum(//Mapping/@inserts)"/>, <xsl:value-of select="sum(//Mapping/@updates)"/>, <xsl:value-of select="sum(//Mapping/@deletes)"/>); END; </xsl:template> </xsl:stylesheet> [END_OF_XSL] [END_OF_DEST]