OWB pukes on RESULT_CACHE function
I created a PL/SQL function that uses the result cache - it works well.
But when I try to import it into OWB, the tool pukes out the following error:
oracle.wh.ui.integrator.oracle.parser.ParseException: Encountered "RESULT_CACHE" at line 2, column 17OWB and database are both 11g.
Anyone had success importing result cached functions in OWB?
The import in the OWB 11g release did not support the result cache functions. You can still use/refer result cache functions in mappings just not import/deploy them, the OWB 11gR1 release was primarily the 10gR2 release with 11g certification and components seeded in the database.
Cheers
David
Similar Messages
-
PL/Sql RESULT_CACHE Function under VPD environment
Hi,
Imagine that I have a VPD environment that depending on the user the data returned from the table in a schema is different than returned to other user. for instance:
The VPD filters the data by company_id in this table
table persons
company_id number(4),
person_id number(4)
person varchar2(100)
now imagine that I connect as scott and scott belongs company_id 1000. If scott runs select * from schema.persons he will see this
1000 123 ANNA
1000 124 MARY
1000 125 SCOTT
If I connect as JOHN and JOHN belongs to company_id 1111. If scott runs select * from schema.persons he will see this
1111 123 ALBERT
1111 124 KEVIN
1111 125 JOHN
This is the VPD environment I have...
So, does RESULT_CACHE functions works well under this type of environment? RESULT_CACHE is shared between sessions... but in this case the sessions of scott and john see always different results. Is there any option of implementing RESULT_CACHE by username?
Regards
RicardoIt appears that the result cache functionality can work with Virtual Private Database. Check out the following links:
Adventures with VPD I: Result Cache
Concepts: Result Cache -
OWB 9.0.3 : Function propagate doesn't work
Hello,
I would like propagate physical objects to logical objects.
The reason :in the repository the objects are differents for a same element id.
In fact , my problem is : I can't generate a mapping. The mapping is validate, but it's impossible to generate it.
So, i think it'wil be better to work with a repository where physical's objects names are the same of logical's objects
Any changes in Local Setup and MLS Display Language and Propagation options doesn't affect.
Have you a solution because when i try to do the action with the menu Preferences->naming, it doesn't work.
Thanks for your help.
PatrickDownload the current iPhoto version from the Mac App Store, buying it if needed.
(119553) -
How to use the Table Function defined in package in OWB?
Hi,
I defined a table function in a package. I am trying to use that in owb using Table function operator. But I came to know that, owb R1 supports only standalone table functions.
Is there any other way to use the table function defined in a package. As like we create synonyms for functions, is there any other way to do this.
I tryed to create synonyms, it is created. But it is showing compilation error. Finally I found that, we can't create synonyms for functions which are defined in packages.
Any one can explain it, how to resolve this problem.
Thank you,
Regards
Gowtham Sen.Hi Marcos,
Thank you for reply.
OWB R1 supports stand alone table functions. Here what I mean is, the table fucntion which is not inculded in any package is a stand alone table function.
for example say sample_tbl_fn is a table function. It is defined as a function.It is a stand alone function. We call this fucntion as "samp_tbl_fn()";
For exampe say sample_pkg is a package. say a function is defined in a package.
then we call that function as sample_pkg.functionname(); This is not a stand alone function.
I hope you understand it.
owb supports stand alone functions.
Here I would like to know, is there any other way to use the functions which are defined in package. While I am trying to use those functions (which are defined in package -- giving the name as packagename.functionname) it is throwing an error "Invalid object name."
Here I would like know, is there any other way to use the table functions which are defined in a package.
Thank you,
Regards,
Gowtham Sen. -
How to declare the function in OWB?
Hi,
I created a function using OWB. And it deployed successfully. I tested it in PL/SQL developper. It is running successfully. But while I am using that function in mapping it is showing the following error
Here FUN_VALIDATION is the function name.
Line 1, Col 1:
PLS-00201: identifier 'Functions.FUN_VALIDATION' must be declared
Line 0, Col 1:
PL/SQL: Statement ignored
thanks and regards
Gowtham sen.It seem i encountered some similar problem but with a table function.
I'm able to execute it sucessfully in sqlDeveloper but i'm not able to execute it into a mapping without an error: PLS-00225: référence de sous-programme ou de curseur 'WEEK_LIST' est hors étendue.
All definitions are in the same module.
The mapping is validated and deployed successfully.
The table function execute sucessfully with data correctly produced when executed in sqlDeveloper.
Here is the code for the function:
CREATE OR REPLACE
FUNCTION WEEK_LIST
( starting_date IN DATE , ending_date IN DATE )
RETURN WEEK_TABLE pipelined
IS
current_week DATE;
BEGIN
current_week := TRUNC(starting_date, 'DAY'); -- initialize with first day of week from starting date
while current_week <= ending_date -- loop until the end limit is overdue
loop
if current_week >= starting_date
then
pipe row( current_week ); -- create the row when current week is greather than first day
end if;
current_week := current_week + 7; -- go to next week
end loop;
return;
END;
I'm not able to import this function in owb project. The function never appear in the list of function to import from the database. I don't undertstand why ?
I don't understand the problem in the mapping too.
I think may be it is a bug !? -
Need some help with the Table Function Operator
I'm on OWB 10gR2 for Sun/Solaris 10 going against some 10gR2 DB's...
I've been searching up and down trying to figure out how to make OWB use a Table Function (TF) which will JOIN with another table; allowing a column of the joined table to be a parameter in to the TF. I can't seem to get it to work. I'm able to get this to work in regular SQL, though. Here's the setup:
-- Source Table:
DROP TABLE "ZZZ_ROOM_MASTER_EX";
CREATE TABLE "ZZZ_ROOM_MASTER_EX"
( "ID" NUMBER(8,0),
"ROOM_NUMBER" VARCHAR2(200),
"FEATURES" VARCHAR2(4000)
-- Example Data:
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (1,'Room 1',null);
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (2,'Room 2',null);
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (3,'Room 3','1,1;2,3;');
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (4,'Room 4','5,2;5,4;');
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (5,'Room 5',' ');
-- Destination Table:
DROP TABLE "ZZZ_ROOM_FEATURES_EX";
CREATE TABLE "ZZZ_ROOM_FEATURES_EX"
( "ROOM_NUMBER" VARCHAR2(200),
"FEATUREID" NUMBER(8,0),
"QUANTITY" NUMBER(8,0)
-- Types for output table:
CREATE OR REPLACE TYPE FK_Row_EX AS OBJECT
ID NUMBER(8,0),
QUANTITY NUMBER(8,0)
CREATE OR REPLACE TYPE FK_Table_EX AS TABLE OF FK_Row_EX;
-- Package Dec:
CREATE OR REPLACE
PACKAGE ZZZ_SANDBOX_EX IS
FUNCTION UNFK(inputString VARCHAR2) RETURN FK_Table_EX;
END ZZZ_SANDBOX_EX;
-- Package Body:
CREATE OR REPLACE
PACKAGE BODY ZZZ_SANDBOX_EX IS
FUNCTION UNFK(inputString VARCHAR2) RETURN FK_Table_EX
AS
RETURN_VALUE FK_Table_EX := FK_Table_EX();
i NUMBER(8,0) := 0;
BEGIN
-- TODO: Put some real code in here that will actually read the
-- input string, parse it out, and put data in to RETURN_VALUE
WHILE(i < 3) LOOP
RETURN_VALUE.EXTEND;
RETURN_VALUE(RETURN_VALUE.LAST) := FK_Row_EX(4, 5);
i := i + 1;
END LOOP;
RETURN RETURN_VALUE;
END UNFK;
END ZZZ_SANDBOX_EX;
I've got a source system built by lazy DBA's and app developers who decided to store foreign keys for many-to-many relationships as delimited structures in driving tables. I need to build a generic table function to parse this data and return it as an actual table. In my example code, I don't actually have the parsing part written yet (I need to see how many different formats the source system uses first) so I just threw in some stub code to generate a few rows of 4's and 5's to return.
I can get the data from my source table to my destination table using the following SQL statement:
-- from source table joined with table function
INSERT INTO ZZZ_ROOM_FEATURES_EX(
ROOM_NUMBER,
FEATUREID,
QUANTITY)
SELECT
ZZZ_ROOM_MASTER_EX.ROOM_NUMBER,
UNFK.ID,
UNFK.QUANTITY
FROM
ZZZ_ROOM_MASTER_EX,
TABLE(ZZZ_SANDBOX_EX.UNFK(ZZZ_ROOM_MASTER_EX.FEATURES)) UNFK
Now, the big question is--how do I do this from OWB? I've tried several different variations of my function and settings in OWB to see if I can build a single SELECT statement which joins a regular table with a table function--but none of them seem to work, I end up getting SQL generated that won't compile because it doesn't see the source table right:
INSERT
/*+ APPEND PARALLEL("ZZZ_ROOM_FEATURES_EX") */
INTO
"ZZZ_ROOM_FEATURES_EX"
("ROOM_NUMBER",
"FEATUREID",
"QUANTITY")
(SELECT
"ZZZ_ROOM_MASTER_EX"."ROOM_NUMBER" "ROOM_NUMBER",
"INGRP2"."ID" "ID_1",
"INGRP2"."QUANTITY" "QUANTITY"
FROM
(SELECT
"UNFK"."ID" "ID",
"UNFK"."QUANTITY" "QUANTITY"
FROM
TABLE ( "ZZZ_SANDBOX_EX"."UNFK2" ("ZZZ_ROOM_MASTER_EX"."FEATURES")) "UNFK") "INGRP2",
"ZZZ_ROOM_MASTER_EX" "ZZZ_ROOM_MASTER_EX"
As you can see, it's trying to create a sub-query in the FROM clause--causing it to just ask for "ZZZ_ROOM_MASTER_EX"."FEATURES" as an input--which isn't available because it's outside of the sub-query!
Is this some kind of bug with the code generator or am I doing something seriously wrong here? Any help will be greatly appreciated!Hello Everybody!
Thank you for all your response!
I had changes this work area into Internal table and changed the select query. PLease let me know if this causes any performance issues?
I had created a Z table with the following fields :
ZADS :
MANDT
VKORG
ABGRU.
I had written a select query as below :
I had removed the select single and insted of using the Structure it_rej, I had changed it into Internal table
select vkorg abgru from ZADS into it_rej.
Earlier :
IT_REJ is a Work area:
DATA : BEGIN OF IT_REJ,
VKORG TYPE VBAK-VKORG,
ABGRU TYPE VBAP-ABGRU,
END OF IT_REJ.
Now :
DATA : BEGIN OF IT_REJ occurs 0,
VKORG TYPE VBAK-VKORG,
ABGRU TYPE VBAP-ABGRU,
END OF IT_REJ.
I guess this will fix the issue correct?
PLease suggest!
Regards,
Developer. -
Result_cache and data dictionary views
Hi,
Are there any special considerations when caching the results of a function which uses data dictionary views to determine it's results?
This question has popped because I have a such a result_cached function for which the result_cache objects are not getting invalidated even when the underlying data dictionary views have changed and the function gives 'stale' values in it's output. Adding the relies_on clause has not helped either.
Here is what I am trying to do:
The function accepts table name as its input and tries to determine all the child tables using the sys.dba_constraints view. The results are returned in a pl/sql table and are cached so that the subsequent calls to this function use the result_cache.
Everything works fine for the parent/child tables which have been created before the creation of this function. All the results are correct.
The problem starts when a new child table is added to an existing parent table.
The v$result_cache_objects view shows the result of this function as 'Published' and the output of the function does not show the newly created child table.
Same is the case when an existing child table is deleted; the function continues to return it in the output as it is pulled from the result_cache.
Oracle version:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production>
Restrictions on Result-Cached Functions*
To be result-cached, a function must meet all of these criteria:
* It is not defined in a module that has invoker's rights or in an anonymous block.
* It is not a pipelined table function.
* It does not reference dictionary tables, temporary tables, sequences, or nondeterministic SQL functions.
For more information, see Oracle Database Performance Tuning Guide.
* It has no OUT or IN OUT parameters.
* No IN parameter has one of these types:
o BLOB
o CLOB
o NCLOB
o REF CURSOR
o Collection
o Object
o Record
* The return type is none of these:
o BLOB
o CLOB
o NCLOB
o REF CURSOR
o Object
o Record or PL/SQL collection that contains an unsupported return type
It is recommended that a result-cached function also meet these criteria:
* It has no side effects.
For information about side effects, see "Subprogram Side Effects".
* It does not depend on session-specific settings.
For more information, see "Making Result-Cached Functions Handle Session-Specific Settings".
* It does not depend on session-specific application contexts.
>
http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/subprograms.htm#LNPLS698 -
OWB vs Informatica, Performance
Hi
I am working on a Proof of Concept which is looking to replace Informatica with OWB. A key factor to the success of the proof of concept is performance.
At present, the OWB mappings seems to be considerably slower, which does not make much sense to me. I have compared the SQL generated from Informatica with the SQL generated from OWB, and they are pretty much the same. They key difference between the two solutions, is an initial processing of the data file. In the OWB solution, this is used as an external table and a number of mapping perform validation functions to prepare the data for further processing. In the Informatica solution, this validation is preformed a file system level, using data caching.
My experince of data caching is fairly limited. Is this a key way to reduce runtime of processing. Is this an advantage of Informatica over OWB, as this is performed outside the database.
Are there any other performance related areas which informatica beat OWB. Surely OWB should always win.
Any feedback would be gratefully received.
Thanks in advance.LS,
I do not have any more hints for you than stated earlier, only more explicitly maybe. Forget the proof of concept.
Either you choose for the one (and only OWB) or for the other. Choise has already been made in the past and the develop/test costs spent.
If you do not know:
- how much money you can actually spent during production with OWB
- how much time/skills/money you can spent during proof of concept of OWB
- how much time/skills/money you can spent during rewriting and conversion of ETL-proces
your battle (proof of concept) is lost at forehand.
The solution of any detail like performance is a waist of time.
OWB and Oracle can function really fast, if
- the right hardware is available
- the right skills are available at ETL-design time.
Do not try to build an even more beautiful castle than the current with only a toothbrush during a proof of concept. Keep the comparison fair.
I would give this assignment back to where it came from.
Regards,
André -
OWB-Workflow fails with RPE-01008, RPE-01009
Hi!
I migrated a project from OWB 9.2.0.4 to OWB 10.1.0.2 and created a simple workflow calling a procedure, an OWB mapping and a function in exactly this order. The procedure does nothing (select user from dual) the mapping copies the contents of one table to another and the function should insert a record into a table. The "do nothing" procedure works fine (it gets an OK in the OWF-Monitor), he mapping copies the required data into a different table without any errors. In OWF-Monitor, the function look like it was executed, but when looking in OWB Audit Browser I get RPE-01008, RPE-01009 error messages. The function did not insert the required data.
I tried to create a small test project in OWB in order send it to Oracle Support, but an identical workflow in the test project works fine without any errors. All objects of the workflow perform like programmed.
Has anybody experienced a similar behavior? To me it, there is no difference in the project. Migration worked without any errors. The OWB 9i connected against 9.2.0.5 database and OWF 2.6.2, OWB10g uses a 10g database with OWF 2.6.3.
Hope anybody can help!
Regards
Michaelwell ....
Could it not be that the upgrade process cleared out the problem, since the process does touch the runtime repos?
We have had similiar problem on our installation, but that came up after moving from 10.1.0.2 to 10.1.0.4
But moving to the lastest version was a very good idea, and will help us to be better ready when the long awaited "Paris" walks into town
Cheers,
Borkur -
Passing databse functions with parameters as custom parameters from comand
Hi,
I have a database function get_id(ichar varchar2) which will return a number which I am trying to pass to a mapping as custom inout parameter using the following command:
@SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," "INPUT_ID=sample_pkg.get_id('I')"
and I get the following error
------ start----------
Session altered.
Role set.
override_custom_input_params(l_audit_execution_id, 'IN_FROM_DATE=1999/01/0108:00,IN_TO_DATE=2003/12/3108:00,BL_LOAD_ID=bl_job_control.get_bl_load_id('I')');
ERROR at line 215:
ORA-06550: line 215, column 155:
PLS-00103: Encountered the symbol "I" when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in is mod not range rem =>
.. <an exponent (**)> <> or != or ~= >= <= <> and or like
between ||
The symbol ". was inserted before "I" to continue.
------ end ----------
However, the command line with NO parameter to the function like the following command works perfect:
@SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," "INPUT_ID=sample_pkg.get_id"
Will OWB commandline not accept function call with parameters? Please treat this as urgent and advice ASAP.
Thanks.Thanks, Mark. It works.However facing another issue. I try to pass to_char(sysdate\,''yyyy/mm/ddhh:mi:ss'') as one of the custom parameters to the mapping as
@SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," "INPUT_STDT=2002/10/2010:10:03,INPUT_enddt=to_char(sysdate\,''yyyy/mm/ddhh:mi:ss'')"
and it erros out as
------ start ------
ORA-01841: (full) year must be between -4713 and +9999, and not be 0 ORA-06512: at line 1
------ end ------
Questions:
1. Why does a simple to_char(sysdate\,'yyyy/mm/ddhh:mi:ss') as an input parameter fail?
2.what is the date format that OWB expects when we pass date as an input parameter.Can the format be modified?
OWB seems to accept the format yyyy/dd/mm only. If I pass as different format, it errors with ORA 1861 Text: literal does not match format string.
3. Where can I change the format in OWB if it can be changed.
NOTE: OWB complains only about INPUT_ENDDT and not INPUT_STDT because, if I hardcode INPUT_ENDDT like 2003/11/178:00 it works.
example:
@SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," INPUT_STDT=2002/10/2008:00,INPUT_ENDDT=2003/11/1706:45:59"
works fine.
Am I missing something here?
Thanks again. -
Hello to everybody!
In this days I'm testing the oracle data integrator as ETL (maybe I'd say ELT), first I've used OWB. According to me ODI is a better solution over OWB.
In ODI for example data quality it's more easy and more you haven't to care to save bad data in any table, ODI does that for you automatically.
What do you think?Since Feb 2009, Oracle has included the ODI base product and OWB's Enterprise ETL functionality in a single pricing bundle called ODI Enterprise Edition. The idea here is that with one license, you can implement either or both products.
To compare the functionality of each, one place to start would be to compare the data sheets.
OWB data sheets at http://www.oracle.com/technology/products/warehouse/index.html
ODI data sheets at http://www.oracle.com/products/middleware/odi/enterprise-edition.html
Or blogs such as http://www.rittmanmead.com/2007/03/26/thoughts-on-oracle-data-integrator/
Btw, the ODI EE pricing bundle does not include other functionality such as data profiling or connecting to various applications. ODI and OWB have separate solutions for those and they still require separate licenses.
Hope this helps,
Michelle
Edited by: mbird on Apr 17, 2009 10:11 PM -
Declare procedure to use in process flow
Hi
I am using a function which return ture or false, i have written a while loop condition if ture then execute else exit.
the while loop condition is calling that function but when ruung owb throws error that function is not declared
ORA-06550: line 1, column 907:
PLS-00201: identifier 'CHK_NXT_VAL' must be declared
ORA-06550: line 1, column 862:
PL/SQL: Statement ignored
I have set every thing to true in execution on configuration of process flow, on configuration property i don't get this function any where so can't set it to true.
Can you help me to declare and where and how to declare
ThanksDid you get this working?
Cheers
David -
Lookup SCD Use Most Current not working
Hello Forum,
Can I get some advice on how to set up/configure the Type 2 History Lookup, the ETL guy and I thought by just selecting the "Use the most current record" option, OWB would do it's auto magic and use the dimension key assigned to the row/record that did not have an expiration date attribute populated..... instead the mapping is loading both the dimension key for the previous version of the record (the expried one) and the new version of the record. The data being added to my fact table now has two rows per daily insert instead of one.... not a good thing.
I'm thinking that we need to use the Effective Date somehow in the look-up so that the new items being added to my cube (fact table) are pointed to the new version of my record in our SCDII Dimension.....
what's the trick to setting up the Type2 History Lookup tab?
what does this radion button do then? "Use most current record"?
Thanks,
RonThere are several outstanding issues (bugs) against the SCD Type2 dimension functionality in OWB.
It is possible your issue may be related one of these:
5372855 - Key Lookup on SCD2 - Parent Values are not Returned (Dimension is populated twice)
5845656 - Need Effective Dates For Initial Version and New Version of Records
6017185 - Dimension Operator Property 'Type2 Gap' Not Working
These bugs are scheduled to be fixed in the next major release of OWB as the SCD functionality is being improved/better documented. -
I would like to know which ANSI standard does ORACLE follow?
quoting wikipedia:
SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International Organization for Standards (ISO) in 1987. Since then, the standard has been enhanced several times with added features. However, issues of SQL code portability between major RDBMS products still exist due to lack of full compliance with, or different interpretations of, the standard. Among the reasons mentioned are the large size and incomplete specification of the standard, as well as vendor lock-in.
I think you may be better off trying to write whatever it is you want to write and seeing if it works that way across databases.
the thing is (and this goes for all databases): some things are more efficient written in the proprietary extensions to SQL than in ANSI SQL. Take recursive with clauses vs the connect by clause etc.
edit:
The other thing to be wary of is the potential for differing functionality depending on how you write your queries. for example even though the database supports ANSI joins, I encountered a bug whereby the result_cache functionality doesn't work when you use ANSI join syntax:
result_cache on tables
Edited by: WhiteHat on Jun 21, 2012 11:58 AM -
Hi,
Can I use the surrogate keys of the source in my data mart, assuming its a pk in source and source maintains history.
I mean I am not coninced of having a different SKeys in my warehouse (additional sequence).
Can anyone give some solid reasons why not to reuse Skeys of the source.
Also Sks in source are numbers.
ThanksFair enough, I think I misunderstood your question. I will defer to someone able to better discuss the relational side of things. I know this is / can be done using insert triggers, etc. - but since this is a completely common thing to do in a DW, I would expect OWB to have special functionality to address this without resorting to code.
I don't know OWB though, so sorry I can't give a specific answer.
Thx,
Scott
Maybe you are looking for
-
Previewing an image before uploading it using the FileReference class
Previewing an image before uploading it using the FileReference class in flash player 3 not in SDK4
-
How can I see preview images of STN files in CS4?
I save many of my art files as STN (Genuine Fractals) files so I can print on demand at various sizes. I used to be able to see tiny preview images of these files; now, using CS4 32-bit or 64-bit with Windows 7 64-bit OS, all I see in my STN folder i
-
I am loading the into 0sd_c03 infocube.
Hi All, I am loading the into 0sd_c03 infocube. But i am facing some problem while loading the data. Requests (messages): Everything OK (Green color) Extraction (messages): Errors occurred (Yellow) Under this : 74626 Records sent(742626 Records rece
-
Impossible to double-click on a todo item when another's title is highlighted
Can anyone reproduce this? 1) Double-click on a todo item. Its title gets automatically highlighted. 2) Double-click on another todo item Expected Results: After 2), the info bubble for the second todo item is displayed. Actual Results: After 2), a n
-
Referencing Tables - "Invalid Reference"
I'm trying to reference a cell between two tables on a single sheet. While this works with several tables, it doesn't work with one of them--even when I click on the cell I want to reference. It will, however, work if I duplicate the table, delete th