Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Oracle GoldenGate 11g Implementer's guide

You're reading from   Oracle GoldenGate 11g Implementer's guide Design, install, and configure high-performance data replication solutions using Oracle GoldenGate

Arrow left icon
Product type Paperback
Published in Feb 2011
Publisher Packt
ISBN-13 9781849682008
Length 280 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
John P Jeffries John P Jeffries
Author Profile Icon John P Jeffries
John P Jeffries
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Oracle GoldenGate 11 Implementer's guide
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started 2. Installing and Preparing GoldenGate FREE CHAPTER 3. Design Considerations 4. Configuring Oracle GoldenGate 5. Configuration Options 6. Configuring GoldenGate for HA 7. Advanced Configuration 8. Managing Oracle GoldenGate 9. Performance Tuning 10. Troubleshooting GoldenGate GGSCI Commands
GoldenGate Installed Components
The Future of Oracle GoldenGate
Index

Using logic in data replication


GoldenGate has a number of functions that enable the administrator to program logic into the Extract and Replicat process configuration. These provide generic functions found in all programming languages, such as; IF and CASE. In addition, the @COLTEST function enables conditional calculations by testing for one or more column conditions. This is typically used with the @IF function as shown in the following example. Here the @COLTEST function tests the AMOUNT column in the source data to see if it is "MISSING" or "INVALID". The @IF function returns a 0 if @COLTEST returns TRUE and the value of AMOUNT if FALSE.

MAP SRC.CREDITCARD_PAYMENTS, TARGET TGT.CREDITCARD_PAYMENTS_FACT, &
COLMAP (USEDEFAULTS, &
AMOUNT = @IF(@COLTEST(AMOUNT, MISSING, INVALID), 0, AMOUNT));

The target AMOUNT column is therefore set to 0 when the equivalent source is found to be missing or invalid, or else a direct mapping occurs.

The @CASE function tests a list of values for a...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image