Physical Table (Dynamic Name) x Physical Table x Alias
Hello,
We are customizing the standard OBI Applications .rpd. but this question is in reference to OBIEE, hence the post here.
I have no problems with Physical Tables and Alias in the Physical layer.
It just happens that the standard OBI Applications .rdp has some other 'physical tables' - the one for: Dim_W_PARTY_ORG_D_Customer that in its properties uses a Dynamic Name pointing to a variable that contains W_PARTY_ORG_D.
There are other similar cases in the vanilla .rpd
I fail to understand why sometimes (most of the time) the vanilla .rpd uses Alias and in these few cases use this strange Physical table. Pls. anyone would care to comment ?
As we expand W_PARTY_ORG_D with new columns... these new columns are NOT automatically part of the Dim_W_PARTY_ORG_D_Customer as it happens in an Alias definition.
Txs. for any comments.
Antonio
Hi Antonio,
From the 11g documentation (http://docs.oracle.com/cd/E14571_01/bi.1111/e10540/physicallayer.htm#i1005872) ;
Select this option to use a session variable to specify the physical table name, similar to catalog and schema objects. This option is available for non-multidimensional data source tables when you select a table type of Physical Table.
You might want to choose this option if you have a multi-tenancy implementation and you want to define a separate physical table name for each customer. Another example would be to select between primary and shadow tables that are valid at different times in your ETL cycle. In both cases, you can assign session variables to dynamically select the appropriate table.
Hope this helps.
Daan Bakboord
http://obibb.wordpress.com
Similar Messages
-
How to create internal table dynamically based on a table entry
hi Experts,
I have table yprod_cat. It has product categories.
In my ABAP program I need to create internal table dynamically based on the number of entries in the table.
For example:
If the table has 3 entries for product category
1. Board
2. Micro
3. Syst
Then create three (3) internal tables.
i_board
i_micro
i_syst
How can we do this? Any sample code will be very usefull
Thanks & Regards
Gopal
Moderator Message: No sample codes can be given. Please search for them or work it!
Edited by: kishan P on Jan 19, 2011 4:22 PMOur APEX version is 4.2We are using below SQL query to display radio groups dynamically..
SELECT APEX_ITEM.RADIOGROUP (1,deptno,'20',dname) dt
FROM dept
ORDER BY 1;
Created a form using SQL type and given abouve SQL query as source.. But when we run the page, there were no radio groups displayed in the page..
Below is the output of the query..
<input type="radio" name="f01" value="10" />ACCOUNTING
<input type="radio" name="f01" value="20" checked="checked" />RESEARCH
<input type="radio" name="f01" value="30" />SALES
<input type="radio" name="f01" value="40" />OPERATIONS
>
If Tabular Form:
Edit Region > Report Attributes > Edit Column > Change the Column type to "Standard Report Column"
If normal Page Item:
Edit Page Item > Security > Escape special characters=No.
Pl read the help on that page item to understand the security risk associated with =NO.
Cheers,
Edited by: Prabodh on Dec 3, 2012 5:59 PM -
Static Tables Creation In oracle & Diff Between Static table ,Dynamic table
Static Tables Creation In oracle & Diff Between Static table ,Dynamic table
972471 wrote:
Static Tables Creation In oracle & Diff Between Static table ,Dynamic tableAll tables in a well designed application should be static tables.
Whilst it's possible to execute dynamic code and therefore create tables dynamically at run time, this is considered poor design and should be avoided in 99.99% of cases... though for some reason some people still think they need to do this, and it's never really justified.
So what issue are you facing that you need to even bother considering dynamic tables? -
Unable to create a table by name "Resource"
Hi,
I am trying to create a table by name "Resource". But getting the error as
[Error Code: 903, SQL State: 42000] ORA-00903: invalid table name
Can anyone please help.
Thanks & Regards
AsitHi,
Try this:
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Nov 26 17:50:18 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create table "Resource"(name varchar2(200));
Table created.
SQL> select * from "Resource";
no rows selected
SQL>Hope this helps.
Thanks. -
Dynamic name for the physical table
Hi Guys,
How to setup dynamic names for the physical table? Where it is useful?*
Pls help me out on this.
thanksCheck this similar post which might be of help dynamic physical table source schema
Cheers,
KK -
Table and field name for Physical Inventory
Hi Experts,
As i have to put radio buttons with 2 blocks in a report for Phys. Inventory. Please tel me the following fields:-
Block1. Table name and field ( flag field) that shows physical inventory completed & not completed. (so many indicator fields but i want exaact one) or any other way to no PI done or not.
Block 2. Table name and Field( flag field ) for Physical Inv. Still to be executed , Physical Inv. Still to be Closed, Phy Inv. Executed, Phy Inv. Active Again.
Regards
Nikhil<b>go to se80
click on repository information system
expand ABAP Dictionary
expand fields
double click on table fields</b>
on the right side of the screen type the description of the field you want to know and execute to know the field name and the table where it is used.
<i>follow the above steps to search by yourself rather than posting each time</i>
regards,
srinivas
<b>*reward for useful answers*</b> -
How to reimport relational table objects into RPD physical layer...
I am new to OBIEE. I am not sure how to reimport relational database tables into physical layer whenever the base database table structure changes.
How do I configure the ODBC or OCI 10G/11G connections on my computer so I can reimport objects into RPD on remote server.
I would appreciate it if you can give step by step instructions
Thanks in advance.Hello -
You can re-import a table to the Physical Layer the exact same way that you would import the table for the first time:
1) Click File > Import > From Database...
2) Select your data source connections
3) Choose your table you wish to reimport
The system will warn you that you will overwrite the existing table and may lose information. The information you would lose is any discrepencies in the physical layer that are no longer existing in the actual database table. However, logical columns will NOT be overwritten.
Alternately, if it is a minor change to the table (say a column name change, or one additional column added), you can also manually add the column
1) Right Click on the already imported table in the presentation layer and select New Object > Physical Column...
2) Name the column and provide the proper data type
The column now exists in the physical layer and will be properly associated with the new column in the database, assuming the same column name was attributed. You WILL have to drag this new column forward to the logical layer and presentation layer, as this will not be automatically done.
I hope this answers your question. If you found this helpful, please assign points!
Regards,
Jason -
Hello,
I can't find the right syntax to do what I need, if it's possible :
Context :
I work actualy on a migration from MS Access applications to Oracle (datas only). So I copied all MS Access Tables into Oracle and created manualy all the relationnal constraints like primary and foreign keys ('cause constraints are not included in 'Copy to Oracle').
I Have often to refresh my datas, because the MS access applications are still in use. Therefore I wrote PL/SQL scripts. They do the folowing, using dynamic SQL with 'Execute Immediate' statement :
Script 1
- disable all user's constraints
- disable all user's triggers
- truncate all user's tables
(Here, I have to do a manual copy of all MS Access tables to Oracle, checking the Append check-box, because the BRIDGE statement doesn't support 'Execute Immediate', and wait...)
Script 2
- enable all user's constraints
- enable all user's triggers
Could someone let me know how Il could do the same as :
For t in (select table_name from user_tables) loop
-- Copy the datas from an Access table into the same Oracle table
execute immediate ('BRIDGE ' || t.table_name || ' AS MyAccessConnName(select * from ' || t.table_name || ') APPEND') ;
-- News flash ...
dbms_output.put_line('Table ' || t.table_name || ' filled') ;
end loop;
-------------------------------------------------------------------------------------------------------------------------- ==> 00900. 00000 - "invalid SQL statement"
If a dynamic table name substitution is applicable in the Bridge statement from a query, I take it with joice!
Thank you for helping me...
DanielHi Daniel,
The BRIDGE statement is just an extra command I implemented in the SQL Developer worksheet script runner.
It gets interpreted by SQL Developer and it dynamically creates (CREATE TABLE , INSERT INTO , SELECT ... ) statements and runs them against the connections specified.
It was developed to improve certain migration features of SQL Developer. We haven't really spent any time developing it into a customer friendly statement to be used in custom scripts.
Hence the lack of doc. But it is there and if you can make it work for yourself all the better.
When I say "One way of doing what you want". I mean I haven't thought about your particular problem exhaustively and I wouldn't want you to take my solution as gospel :)
If you are happy running a script in SQL Developer, but would rather not run 2 scripts , or cut and paste results around, you could SPOOL the results and execute them.
--call your other scripts to disable constraints during the data move
set echo off;
set feedback off;
set linesize 1000;
set pagesize 0;
set headsep off;
set termout off;
set verify off;
set heading off;
SET PAGES 0;
SET HEAD OFF;
spool c:\mydynamicscript.sql
select 'BRIDGE ' || table_name || ' AS MyAccessConnName(select * from ' || table_name||');' from user_tables ;
spool off
@c:\mydynamicscript.sql
--call another script to enable your constraints again
Regards,
Dermot.
SQL Developer Team. -
Dynamic names for I$ ,C$ and E$ tables in ODI
Dear ODI Team,
We have a requirement where we are loading header data and then line data in our Package.ODI internally creates work tables to load data into target tables.If multiple sessions of the same interface is executed at the same time the I$table of the previous session affects the I$ table of the next session.Hence if session1 has completed loading then it is at the stage of dropping the I$ table.Hence the second session is erroring out.Kindly let me know if there is an option to create these work table names dynamically for each session
Thanks ,
AnandEven I an getting similar error trying to use Global variable for dynamic names of the work tables
Scripts Generated by the IKM :
create table XDO.#global."gv_test_dynameSSTST_AN"
ANY_NEW_ID NUMBER(22) NULL,
ANY_NEW_ATTRIB1 VARCHAR2(50) NULL,
ANY_CONC_ATTRIB2 VARCHAR2(150) NULL,
DECODE_CODE1 CHAR(5) NULL,
ANY_REF_CODE2 VARCHAR2(60) NULL,
ANY_DATE1 DATE NULL,
ANY_DATE2 DATE NULL,
IND_UPDATE char(1)
NOLOGGING
Getting the following error on execution :
911 : 42000 : java.sql.SQLException: ORA-00911: invalid character
java.sql.SQLException: ORA-00911: invalid character
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Thread.java:595) -
Creating Dynamic Internal table with a dynamic name
Hi,
I want to create dynamic internal tables with dynamic names.
For example:
Suppose I have a table with three fields.
1. Structure name
2.Fields
3.file
And the structure of the internal table is as follows:
TYPES:BEGIN OF table_type,
struct TYPE char70,
fields TYPE tt_type OCCURS 0,
File TYPE ttab_type OCCURS 0,
END OF table_type.
Suppose I have one record inside my internal table with struct as "STRUCTURE", fields have an internal table content of set of fields and File has some set of records.
Now I want to create dynamic internal table whose name will be "STRUCTURE" , the fields of the dynamic internal table structure[] will be as in fields, and the records will be as in File.
Like this if i have 100 records in my internal table then I have to create 100 dynamic internal table dynamically.
Can anyone suggest how to do this?
Edited by: Jjammy on Jul 22, 2009 7:52 AMHi,
Check the sample program and develop your program accordingly.
<font color=blue><pre>
REPORT ztest_notepad.
*& Declarations
*Type-pools
TYPE-POOLS:
slis.
*Types
TYPES:
ty_fcat TYPE lvc_s_fcat,
ty_fcatalog TYPE slis_fieldcat_alv.
*Work areas
DATA:
wa_fcat TYPE ty_fcat,
wa_fcatalog TYPE ty_fcatalog.
*Internal tables
DATA:
it_fcat TYPE STANDARD TABLE OF ty_fcat,
it_fcatalog TYPE STANDARD TABLE OF ty_fcatalog.
*Type reference
DATA:
it_dyn_tab TYPE REF TO data,
wa_newline TYPE REF TO data.
*Filed symbols
FIELD-SYMBOLS:
<gt_table> TYPE STANDARD TABLE,
<fs_dyntable>,
<fs_fldval> TYPE ANY,
<l_field> TYPE ANY.
*Variables
DATA:
l_fieldname TYPE lvc_s_fcat-fieldname,
l_tabname TYPE lvc_s_fcat-tabname,
l_fieldtext TYPE lvc_s_fcat-seltext,
l_index TYPE char2.
"Selection-screen
PARAMETERS:
p_colms TYPE i.
*& start-of-selection.
START-OF-SELECTION.
PERFORM build_fieldcat.
PERFORM create_dynamic_table.
DO 20 TIMES.
DO p_colms TIMES.
l_index = sy-index.
CONCATENATE 'FIELD' l_index INTO l_fieldname.
ASSIGN COMPONENT l_fieldname OF STRUCTURE <fs_dyntable> TO <l_field>.
<l_field> = sy-index.
ENDDO.
INSERT <fs_dyntable> INTO TABLE <gt_table>.
ENDDO.
LOOP AT it_fcat INTO wa_fcat.
PERFORM fieldcatalog1 USING: wa_fcat-fieldname
wa_fcat-tabname
wa_fcat-seltext.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = 'ZTEST_NOTEPAD'
it_fieldcat = it_fcatalog
TABLES
t_outtab = <gt_table>.
*& Form BUILD_FIELDCAT
FORM build_fieldcat .
CLEAR: l_fieldname,
l_tabname,
l_fieldtext,
l_index.
DO p_colms TIMES.
CLEAR l_index.
l_index = sy-index.
CONCATENATE 'FIELD' l_index INTO l_fieldname.
CONCATENATE 'Field' l_index INTO l_fieldtext.
l_tabname = '<GT_TABLE>'.
PERFORM fieldcatalog USING: l_fieldname
l_tabname
l_fieldtext.
ENDDO.
ENDFORM. " BUILD_FIELDCAT
*& Form CREATE_DYNAMIC_TABLE
FORM create_dynamic_table .
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fcat
IMPORTING
ep_table = it_dyn_tab.
ASSIGN it_dyn_tab->* TO <gt_table>.
Create dynamic work area and assign to FS
CREATE DATA wa_newline LIKE LINE OF <gt_table>.
ASSIGN wa_newline->* TO <fs_dyntable>.
ENDFORM. " CREATE_DYNAMIC_TABLE
*& Form FIELDCATALOG
FORM fieldcatalog USING field table f_txt.
wa_fcat-fieldname = field.
wa_fcat-tabname = table.
wa_fcat-seltext = f_txt.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ENDFORM. " FIELDCATALOG
*& Form FIELDCATALOG1
FORM fieldcatalog1 USING field table f_txt.
wa_fcatalog-fieldname = field.
wa_fcatalog-tabname = table.
wa_fcatalog-seltext_m = f_txt.
APPEND wa_fcatalog TO it_fcatalog.
CLEAR wa_fcatalog.
ENDFORM. " FIELDCATALOG1 </pre>
</font>
Thanks
Venkat.O -
Hello,
Can anyone help me out to write a vb.net script.
I need to read the column names from excel and based on that column names I need to create a table in database(I have more than one sheet in excel).
For each sheet columns will be changing and should create a table dynamically for each sheet.
Any help would be appreciated.Refer the below script to read columns in each sheet.
Dim excelfile As String = Dts.Variables("ExcelPath").Value.ToString
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + excelfile + ";Extended Properties=Excel 8.0"
Dim oledbcon As New OleDb.OleDbConnection(connectionstring)
oledbcon.Open()
Dim dt As DataTable
Dim schemaTable As DataTable
Dim OLEDBCMD As New OleDb.OleDbCommand
Dim oledbdatareader As OleDb.OleDbDataReader
Dim columns As String = ""
dt = oledbcon.GetSchema("Tables")
Dim TABCOMMAND(20) As String
Dim TABCOUNT As Integer = 0
For Each row As DataRow In dt.Rows
TABCOMMAND(TABCOUNT) = "SELECT * FROM [" & row.Item("TABLE_NAME").ToString & "]"
OLEDBCMD.CommandText = TABCOMMAND(TABCOUNT)
OLEDBCMD.Connection = oledbcon
oledbdatareader = OLEDBCMD.ExecuteReader(CommandBehavior.KeyInfo)
schemaTable = oledbdatareader.GetSchemaTable()
For Each myfield As DataRow In schemaTable.Rows
For Each myproperty As DataColumn In schemaTable.Columns
If myproperty.ColumnName = "ColumnName" Then
columns = columns & myfield(myproperty).ToString & ","
MsgBox(myfield(myproperty).ToString)
End If
Next
Next
oledbdatareader.Close()
OLEDBCMD.Dispose()
Next
oledbcon.Close()
Regards, RSingh -
Dynamic Name for Yellow Interface Table
Hi All,
Can anybody guide me how to use dynamic name for Yellow Interface Target Table.
Eg: T_SESSIONID.
I tried
1)Refreshing the SESSIONID in a Variable V1 and using T_#V1 directly
2) Refreshing the T_#V1 in a Variable V2 and using #V2
But its not creating properly.
Please guide.You want to create dynamic target table name right?
You can refresh a variable like #GET_SESSION
#GET_SESSION= SELECT <%=odiRef.getSession("SESS_NAME")%> FROM DUAL
My tmp table name like TMP_#GET_SESSION
then in your package refresh #GET_SESSION variable and you can use it.
I hope this can be helpful
Thanks -
Dynamically passing the source table name to OWB mapping
I am building a mapping wherein one of the source tables is a view. The view name varies with the time parameter I pass in. I am looking at ways to pass in the time parameter to the mapping procedure such that it first gets the view name from a table and uses that view as the source table to fetch data. Any directions?
In normal PL/SQL coding, I can first get the view name and use this view name to buld a dynamic query, which can be then executed.This is a common question. The best way to do this is to use a synonym.
Create the synonym in the database and import into OWB. Use the synonym in your mapping. Have your mapping accept a mapping input for the table you want the synonym to point to. Setup a premapping process to re-create the synonym with the table you want to use.
Here is the procedure that I use. It defaults to a private synonym. Remember, the synonym will be created in the same schema that the mapping is deployed to.
CREATE OR REPLACE PROCEDURE "CAWDATA"."CREATE_SYNONYM_PRC" ("P_SYNONYM_NAME" IN VARCHAR2, "P_OBJECT_NAME" IN VARCHAR2,
"P_IS_PUBLIC_SYNONYM" IN BOOLEAN DEFAULT false) IS
BEGIN
if p_is_public_synonym = true then
execute immediate 'create or replace public synonym '|| p_synonym_name || ' for '|| p_object_name;
else
execute immediate 'create or replace synonym '|| p_synonym_name || ' for '|| p_object_name;
end if;
exception
when others
then
raise_application_error(sqlcode,sqlerrm) ;
END; -
'use dynamic name' and 'caching properites' options for alias table...
Hello everybody,
can anybody please explain 'use dynamic name' and 'caching properites' options for alias tables...
Thanks...
eagerly waiting for a response..
VijayYou want to create dynamic target table name right?
You can refresh a variable like #GET_SESSION
#GET_SESSION= SELECT <%=odiRef.getSession("SESS_NAME")%> FROM DUAL
My tmp table name like TMP_#GET_SESSION
then in your package refresh #GET_SESSION variable and you can use it.
I hope this can be helpful
Thanks -
Dynamically changing name of JPA Table via @Table(name=..)
In my application I need to change dynamically the name of a table to create, which is annotated
via @Table(name="MyTable")
The problem is that the application handled all tables with an internal prefix so that MyTable would
be changed to something like "application1_MyTable". In xml mappings it is possible by injecting
a modified version of the xml mapping content, in plain jdbc only dynamic statements must be used
for this kind of renaming. But how can I achive this with (immutable) annotations?Serethos_0 wrote:
No, I'm betting that you really don't.
Sounds like a very bad design.
I'd be shocked if you could manage to give a good, coherent reason beyond "because I said so".There is always a trap which can force you to support a bad design despite better knowledge:Or, if you're really smart, refactor the trap out of existence.
legacy issues. Depending on the project an old chunk of application code lets you only change
design to a certain degree (based on time, effort, dependencies to other systems). In my case
there is a need to keep the distinction of tables by a dynamic prefix.I'll agree that I might not understand fully. Why not temporary tables or materialized views? Is your idea the only way to accomplish this?
%
Maybe you are looking for
-
Load error code 3 unable to load front panel
Hi all, Wrote a vi in 8.6 and saved it for 8.5 for collaborators. When they run it up pops the error code 3 unable to load front panel. Memory full. see attached picture. Has anyone any suggestions as to how to fix this? Regards, leeser Attachments:
-
No remote for Apple TV and its never been in my network will an Ethernet cable help
My second hand Apple TV has no remote, therefor I know I can't get to the settings to find a network using the remote app because it is new but can I get an Ethernet cable, plug it in to the router and then use my phone?
-
I am not able to call a stored function in database
Hi, i have created a function and when i call it every time i faced error. what is the reasone plz help me. the whole script is as under: SQLWKS> create or replace function get_months ( v_year in number) return number 2> is 3> v_months number; 4> beg
-
How To Use CS5 Perspective Tool
Does anyone know how to place jpgs using the perspective tool without converting it to a vector? The file is too large for the web. Any tips?
-
Please send me Extraction Methadalogy in bw7.0
Dear Friends, Please send me Extraction method(from r/3 to bw)in H.R MODULE VERSION:BIW/BW 7.0 this is very urgent Good reply will get good points Regards, SridharMenda