SQLEXEC not able to filter extract on sql statement or function call.
danielsApr 4 2012 — edited Apr 5 2012hi all,
i'm trying to do some basic extract filtering using a stored function and am not having much success.
i started off using a procedure call but have been unsuccessful getting that working, i've simplified
it to use a sql statement calling a function for a value to filter on, but cannot even get that to work.
i've read through the documentation and i cannot figure out what is going wrong.
any help would be much appreciated.
thx,
daniel
function code is very simple, just trying to get something working.
FUNCTION f_lookup_offer_id(v_offer_id IN offer.offer_id%TYPE)
RETURN company.name%TYPE IS
lv_company_name company.name%TYPE;
BEGIN
SELECT c.name
INTO lv_company_name
FROM orders a, offer b, company c
WHERE a.offer_id = b.offer_id
AND b.company_id = c.company_id
AND a.order_id = v_order_id;
RETURN lv_company_name;
END f_lookup_offer_id ;
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.0.0 Build 078
Solaris, sparc, 64bit (optimized), Oracle 10 on Jul 28 2010 13:26:39
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
EXTRACT EATUOP1
INCLUDE ./dirprm/GGS_LOGIN.inc
EXTTRAIL ./dirdat/up
DISCARDFILE ./dirout/eatuop1.dsc, append , MEGABYTES 50
DISCARDROLLOVER ON SUNDAY AT 06:00
-----------------------------------------------------------------------
-- Database and DDL Options
-----------------------------------------------------------------------
-- Added to avoid errors when setting unused columns
DBOPTIONS ALLOWUNUSEDCOLUMN
-- Get full row for deletes
NOCOMPRESSDELETES
-- Get updates before
GETUPDATEBEFORES
-- If commit SCN that is not greater than the highest SCN already processed error
THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 15000 IOLATENCY 6000
-- Retains original timestamp. Currently using GMT
NOTCPSOURCETIMER
-----------------------------------------------------------------------
--TABLE DEFS
-----------------------------------------------------------------------
TABLE master.OFFER,
SQLEXEC ( ID ck_offer,
QUERY " select master.f_lookup_offer_id(:off_id) is_company from dual ",
PARAMS (off_id = offer_id),
BEFOREFILTER),
FILTER (@GETVAL (ck_offer.is_company = "Google, Inc."));
does not give any errors, but also does not capture any data, it's filtering everything out and trail files are empty, minus a header.
thoughts or help?
2012-04-04 22:17:36 INFO OGG-00993 Oracle GoldenGate Capture for Oracle, eatuop1.prm: EXTRACT EATUOP1 started.
2012-04-04 22:17:36 INFO OGG-01055 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Recovery initialization completed for target file ./dirdat/up000022, at RBA 978.
2012-04-04 22:17:36 INFO OGG-01478 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Output file ./dirdat/up is using format RELEASE 10.4/11.1.
2012-04-04 22:17:36 INFO OGG-01026 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Rolling over remote file ./dirdat/up000022.
2012-04-04 22:17:36 INFO OGG-01053 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Recovery completed for target file ./dirdat/up000023, at RBA 978.
2012-04-04 22:17:36 INFO OGG-01057 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Recovery completed for all targets.
2012-04-04 22:17:36 INFO OGG-01517 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Position of first record processed Sequence 13469, RBA 21894160, SCN 1789.722275534, Apr 4, 2012 10:12:40 PM.
-rw-rw-rw- 1 svc_ggs 502 978 Apr 4 22:17 up000023