User prefix in execution of a procedure
424400Aug 9 2007 — edited Aug 21 2007Hi,
I run into the following issue:
Everytime I execute a procedure from ODI, I notice that a default username is used as a prefix.
For example, when I have a create table statement, regardless of the context I choose when executing, this table will always be created in the userschema that I have defined in the Topology Manager for my technolory (in this case 'Oracle', user=DWH).
Now, normally, this is not a problem, because I can use
<?=snpRef.getObjectName("L", "TABLE_NAME", "D") ?> in my procedures
which will prefix the table name with the correct schema-name.
But now my problem is:
I am being asked to make a script which creates a materialized view, based on two tables which contain Oracle Spatial columns & indexes.
For this, the function "SDO_JOIN" is being used.
I'm not sure, but it looks like this function performs a query on ALL_IND_COLUMNS (the code of this function is wrapped...).
However, when I execute the create script, it errors with:
13249 : 72000 : java.sql.SQLException: ORA-13249: SELECT index_owner, index_name from all_ind_columns WHERE table_name = 'DM_BLOCKS' and column_name = 'BLOCK_GEOMETRY' and table_owner = 'DWH' Error in join: check spatial table/indexes
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_JOIN", line 289
ORA-06512: at line 1
.. to me, the error seems to be that the function calls the " table_owner = 'DWH' " clause. But, this is the wrong username! User 'DWH' is the user that is defined in the Topology Manager.. But this user does not have tables and certainly no Spatial indexes..
Does anyone knows how I can bypass this?
Is there a function in ODI to pick up the context?
Or does there exist a preference where you can set this 'default user' ?
Any hints are much appreciated!!
Steffen