Customization of the KM to create the view on the target

Hi all.

I need to work with DBLinks in my project. But I do not have the rights to create something in my sources. So, I took the LKM Oracle (Oracle DBLINK), duplicate and began to change.

All orders executed on the source, I changed to run it on the target (scheme of work). I created an option called DBLINK_NAME to receive my DBLINK.

The code is the following:

create or replace view < %=odiRef.getObjectNameDefaultPSchema ("L", "", "W") % > < % = odiRef.getInfo ("COLL_NAME") % >
(
< % = odiRef.getColList ("", "[CX_COL_NAME]", "\n\tclick", "", "") % >
)
in select < % = odiRef.getPop("DISTINCT_ROWS") % >
< % = odiRef.getColList ("", "[PHRASE]", "\n\tclick", "", "") % >
from < % = odiRef.getSrcTablesList () % > < % = odiRef.getOption("DBLINK_NAME") % >
where (1 = 1)
< % = odiRef.getFilter () % >
< % = odiRef.getJrnFilter () % >
< % = odiRef.getJoin () % >
< % = odiRef.getGrpBy () % >
< % = odiRef.getHaving () % >


But the OdiRef.GetFrom () returns the following result set:

OWNER. DATASTORE_ALIAS DATA STORE

And when it runs the command, I got the following code:

SYSFID. TABLE_CARDS T1@DBLINK_DEV

And I need to return the owner.datastore without the alias:

SYSFID. TABLE_CARDS@DBLINK_DEV

Also, I need for my @DBLINK_NAME for each table that is used as a source of concatenate.

I need help on this, urgent.

Kind regards.
Luiz Araujo (aka Buchu_VP)

For the alias, use:

SELECT '< %="odiRef.getSrcTablesList" ("",="" "[schéma].="" [="" res_name]"\+odiref.getoption="" ("dblink_name")="" \="" +="" « [pop_tab_alias] »,="" «, », » »)="" %="" >="" '="">

Cezar Santos
http://odiexperts.com

Tags: Business Intelligence

Similar Questions

  • You can create a view that filters (ESX host) Linux machines on the view of the Infrastructure?

    Hello

    We have recently implemented Foglight and VMware plugin. As part of the VMware plugin, Foglight pulls in all the Linux VM machines including the ESX host. Our team of Linux only manages the running redhat Linux hosts. They fail the ESX VM guest. That said, is there a way to create a view that shows only the hosts running redhat Linux?

    For example the view of rail infrastructure below contains 88 Linux machines, but nearly half of them are ESX hosts for our Linux team would not see all these. Is it possible to filter these?

    Any help is appreciated.

    Thank you

    Tony

    The easiest way would be to create a personalized, pair it with Infrastructure and then create a dynamic management component.  This will help create you a rule for "All hosts" where you can find just the hosts that are not of the ESX host and run Linux.

    The query would be:

    detail.topologyTypeName! = "VMWESXServer" & os.longName like «% Linux»

  • How to create a Viewer without buying the image? I want to be able to save the images I'm looking a subject without purchase or download.

    How to create a Viewer without buying the image? I want to be able to save the images I'm looking a subject without purchase or download.

    After talking to the Customer Service, I now get it. Thank you.

    That is to say: down arrow recorded a watermark image in the gallery without you buy. You can download an overview lores on your desktop for motorhomes with this same arrow, but it is unfortunately a watermark (unlike the DPC). You can also copy and send a link to the Gallery clients to review before you buy.

  • Create a view using the table

    Hi all

    I am beginner in Oracle.

    I have a two-column table that I use to create a view documents/statement once it meets the qualification.

    The table has fields. 1 number and 2. Group. If there is more than 3 records found on this table with the same NUMBER and the GROUP he should create this table view.

    Thank you

    Pramod Devkate

    The training is therefore two lines for a ticket and the agent. When the third row is added, create a line in the summary table. Later a fourth line is added to the table of training for this ticket and the agent, but we do not update the line in the summary table. We only touch the summary table when the third row is added to the training table, then it is only updated by the application. Very well

    INSERT INTO summary (ticket, agent, total_travel, total_mtts)

    Select ticket agent, sum (travel), sum (mtts)

    training

    where (ticket, agent) not in

    (select the ticket agent summary)

    Group ticket, agent

    having count (*) > 2.

    This inserts in the table only notes and agent ID that do not exist already.

  • create materialized view log on the table without a primary key

    Hi all
    CREATE TABLE client_months 
    (
      SUBJ_CODE         NUMBER(4),
      SERV_CODE         NUMBER(4),
      DEBIT_CODE        NUMBER(4),
      PERIOD_NUM        NUMBER(2),
      PERIOD_NAME       VARCHAR2(40 CHAR),
      FIRST_MON_DAY     DATE,
      LAST_MON_DAY      DATE,
      VALUE_MON_DAY     DATE,
      MONTHES           NUMBER(4,2),
      GARDENING_WEIGHT  NUMBER(5,4),
      REASON_CODE       NUMBER(5),
      STAMP_ACTION      VARCHAR2(1 CHAR),
      STAMP_CDATE       DATE                        DEFAULT SYSDATE,
      STAMP_DATE        DATE,
      STAMP_USER        VARCHAR2(15 CHAR),
      REGION_CODE       NUMBER(9)
    )
    table created.
    
    CREATE UNIQUE INDEX client_months_UK  ON client_months 
    (SUBJ_CODE, SERV_CODE, DEBIT_CODE, PERIOD_NUM, REGION_CODE)
    index created.
    
    CREATE MATERIALIZED VIEW LOG ON client_months with rowid;
    
    CREATE MATERIALIZED VIEW client_months_mv 
    BUILD immediate 
    REFRESH FAST ON COMMIT 
    AS 
    SELECT * FROM client_months;
    
    ORA-12014: table 'CLIENT_MONTHS' does not contain a primary key constraint
    I don't want to refresh the mview when validation is performed on the base table.
    And I don't want to change the base table by adding a primary key.

    is it possible to create the mview journal using the unique index? or another solution?
    Please help
    Thanks in advance
    Naama

    Naamas wrote:
    No,
    I already read this post!

    Then you read wrong:

    SQL> CREATE TABLE client_months
      2  (
      3    SUBJ_CODE         NUMBER(4),
      4    SERV_CODE         NUMBER(4),
      5    DEBIT_CODE        NUMBER(4),
      6    PERIOD_NUM        NUMBER(2),
      7    PERIOD_NAME       VARCHAR2(40 CHAR),
      8    FIRST_MON_DAY     DATE,
      9    LAST_MON_DAY      DATE,
     10    VALUE_MON_DAY     DATE,
     11    MONTHES           NUMBER(4,2),
     12    GARDENING_WEIGHT  NUMBER(5,4),
     13    REASON_CODE       NUMBER(5),
     14    STAMP_ACTION      VARCHAR2(1 CHAR),
     15    STAMP_CDATE       DATE                        DEFAULT SYSDATE,
     16    STAMP_DATE        DATE,
     17    STAMP_USER        VARCHAR2(15 CHAR),
     18    REGION_CODE       NUMBER(9)
     19  )
     20  /
    
    Table created.
    
    SQL> CREATE UNIQUE INDEX client_months_UK  ON client_months
      2  (SUBJ_CODE, SERV_CODE, DEBIT_CODE, PERIOD_NUM, REGION_CODE)
      3  /
    
    Index created.
    
    SQL> CREATE MATERIALIZED VIEW LOG ON client_months with rowid
      2  /
    
    Materialized view log created.
    
    SQL> CREATE MATERIALIZED VIEW client_months_mv
      2  BUILD immediate
      3  REFRESH FAST WITH ROWID ON COMMIT -- pay attention to WITH ROWID
      4  AS
      5  SELECT * FROM client_months
      6  /
    
    Materialized view created.
    
    SQL>
    

    SY.

  • creating a view and use the view in a model

    Hi all

    I'm new to OBIEE, and I have a requirement that I have two fields to be added to a domain. Because we cannot add queries directly to a model, I have to create a view and then put the request in it, and then use the view in this model.
    I did not understand this well, if someone could help me, explaining in detail the view and adding a query in it?

    Thank you
    Gohan

    Hello

    (a) If you want to use your existing DB view please tick box import meta option data - RPD--> file menu
    (b) If you want to create the new view in RPD itself just right click anyof a physical table--> properties--> click the genral--> change the type of array as "Select" then you create/update your sql query, and then click ok that's all
    Once created, you can deploy advice on the database (right mouse button) or you can leave the view cancelled (worst performance).

    Ref steps more to create views
    http://gerardnico.com/wiki/dat/OBIEE/opaque_view
    http://allaboutobiee.blogspot.com/2012/05/OBIEE-11g-deployundeploy-view-in.html

    Thank you
    Deva

  • Cannot create Materialized View using the PL/SQL procedure

    Hello

    I have a question related to the creation of materialized view.
    I have a stored procedure that creates the materialized view. When you try to perform this procedure, I get not enough privileges error: ORA-01031.

    When I run the content of this procedure as a PL/SQL block anonymous their materialized view is created without any complications.
    Can you please advice me on this subject?
    It is even possible to create a materialized view in the stored procedure as I found no info on this subject.

    Thank you
    Petr

    Hi chudapet,

    Whenever you make in procedure, you must have direct subsidies and not through a role.

    Most likely the grant to create a materialized view is available via a role to your username.
    Assign a direct grant to the user:

    grant create materialized view to scott;
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    
  • Creating a view using multiple joins - by reducing the number of output lines

    It is difficult to put into words exactly what I want to implement, so I'll just use an example. Let's say I have the following database:

    game (id, time, place)

    Reader (game_id, name)

    Referee (game_id, name)

    Foreign keys:
    Player (game_id) references game (id)
    Referee (game_id) references game (id)

    It is a very special match, in which:
    A game can have 1 to many players
    A game can have from 1 to several arbitrators

    I want to create the following view:

    Game_overview (Game_id, time, player, referee)

    It's easy to create this view with the following output:

    Game1, 15:00, player1, Referee1
    Game1, 15:00, player1, Referee2
    Game1, 15:00, player2, Referee1
    Game1, 15:00, player2, Referee2
    Game1, 15:00, Joueur3, null
    08:00, player1, Referee1, GaMe2
    GaMe2, 08:00, player1, Referee2

    HOWEVER, I want it to look like this:

    Game1, 15:00, player1, Referee1
    Game1, 15:00, player2, Referee2
    Game1, 15:00, Joueur3, null
    08:00, player1, Referee1, GaMe2
    GaMe2, 08:00, null, Referee2

    I think that this should not be TOO difficult to solve, but I can't really get my head around it.

    Welcome to the forum!

    Whenever you have a problem, please post CREATE TABLE and INSERT statements for your sample data. Sinve it's your first post, I'll do it for you:

    CREATE TABLE     game
    (       id          VARCHAR2 (10)     PRIMARY KEY
    ,     time          VARCHAR2 (10)
    --,     location     VARCHAR2 (10)     -- No need to include columns that play no role in this problem
    );
    
    INSERT INTO game (id, time) VALUES ('Game 1',  '3PM');
    INSERT INTO game (id, time) VALUES ('Game 2',  '8AM');
    
    CREATE TABLE     player
    (       game_id          VARCHAR2 (10)
    ,     name          VARCHAR2 (10)
    );
    
    INSERT INTO  player (game_id, name) VALUES ('Game 1',  'Player 1');
    INSERT INTO  player (game_id, name) VALUES ('Game 1',  'Player 2');
    INSERT INTO  player (game_id, name) VALUES ('Game 1',  'Player 3');
    INSERT INTO  player (game_id, name) VALUES ('Game 2',  'Player 1');
    
    CREATE TABLE     referee
    (       game_id          VARCHAR2 (10)
    ,     name          VARCHAR2 (10)
    );
    
    INSERT INTO  referee (game_id, name) VALUES ('Game 1',  'Referee 1');
    INSERT INTO  referee (game_id, name) VALUES ('Game 1',  'Referee 2');
    INSERT INTO  referee (game_id, name) VALUES ('Game 2',  'Referee 1');
    INSERT INTO  referee (game_id, name) VALUES ('Game 2',  'Referee 2');
    

    In this way, people who want to help you can recreate the problem and test their ideas.

    In addition, to say what version of Oracle you are using. The following query will work in Oracle 9.1 or more.

    What you asked is what I call a Query, fixed-price , and this is a way to do it:

    WITH     player_plus     AS
    (
         SELECT     game_id
         ,     name
         ,     ROW_NUMBER () OVER ( PARTITION BY  game_id
                                   ORDER BY          name
                           )         AS r_num
         FROM    player
    )
    ,     referee_plus     AS
    (
         SELECT     game_id
         ,     name
         ,     ROW_NUMBER () OVER ( PARTITION BY  game_id
                                   ORDER BY          name
                           )         AS r_num
         FROM    referee
    )
    SELECT       g.id
    ,       g.time
    ,       p.name     AS player_name
    ,       r.name     AS referee_name
    FROM             player_plus     p
    FULL OUTER JOIN  referee_plus   r  ON   p.game_id     = r.game_id
                                    AND     p.r_num          = r.r_num
    JOIN           game          g  ON     g.id          = COALESCE (p.game_id, r.game_id)
    ORDER BY  g.id
    ,         COALESCE (p.r_num, r.r_num)
    ;
    

    Output:

    ID         TIME       PLAYER_NAM REFEREE_NA
    ---------- ---------- ---------- ----------
    Game 1     3PM        Player 1   Referee 1
    Game 1     3PM        Player 2   Referee 2
    Game 1     3PM        Player 3
    Game 2     8AM        Player 1   Referee 1
    Game 2     8AM                   Referee 2
    

    I see that you have more arbitrators than players in a game. If such was not the case, then you might make it a bit more efficient using a LEFT OUTER JOIN between p and r, rather than a FULL OUTER JOIN, and you can also use only the columns of p where I use COALESCE.

    Published by: Frank Kulash, March 9, 2012 18:15
    Fixed spelling

  • create a view with the double data type

    I have Windows XP with 10g 10.2.0.1.0

    I need to create a view of the double and with the type of data, such as NUMBER (5.2), NUMBER or VARCHAR2 (20).
    such as:
    create see test (view_test varchar2 (20)) as (select view_test from double)


    Help, please. Thanks in advance.

    It seems a little strange, but you can do something like this with the CAST function:

    SQL> create view dual_view as
      2  select cast(null as number(5,2)) col1
      3        ,cast(null as date)    col2
      4        ,cast(null as varchar2(30)) col3
      5  from   dual;
    
    View created.
    
    SQL> desc dual_view
     Name                                      Null?    Type
     ----------------------------------------- -------- -------------------------
     COL1                                               NUMBER(5,2)
     COL2                                               DATE
     COL3                                               VARCHAR2(30)
    

    I used the NULL values, but you can use the actual values if you wish.

  • Creating a view of mast bearing the same name with the name of the table

    Hello world

    After having dropped the name of view mast QQ. "" TRDLN_DIM_MV ", I try to recreate by having the same name as the table, but I got an error message stating that"the name is already used by an existing object. How to create a matte view to resemble the object possessed by schema 'GQ', with a name identical to the name of the table, drop the table?

    OWNER_O CREATED LAST_DDL_ TIMESTAMP STATUS OBJECT_NAME OBJECT_TYPE
    ===
    GQ MATERIALIZED VIEW 5 NOVEMBER 08 2008 13 DECEMBER 08-11 - 05:06:31:46 TRDLN_DIM_MV VALID
    GQ TABLE 5 NOVEMBER 08 2008 15 DECEMBER 08-11 - 05:06:31:00 TRDLN_DIM_MV VALID
    QQ TABLE 17 AUGUST 07 16 MARCH 09 2007-08 - 17:17:05:21 TRDLN_DIM_MV VALID

    SQL & gt; CREATE THE QQ MATERIALIZED VIEW. TRDLN_DIM_MV
    2 TABLESPACE FPLC01S
    3 NOCACHE
    4 NOLOGGING
    5 PACK
    6 PARALLEL (DEGREE 1 2 INSTANCES)
    7 BUILD IMMEDIATE
    8 REFRESH FORCE ON REQUEST
    9 WITH PRIMARY KEY
    10 AS
    11 Select / * + NO_REWRITE * / trdln_id,.
    trdln_skid 12,
    trdln_end_date 13,
    FIRST_VALUE (trdln_end_date) 14 over (partition by order of trdln_id trdln_end_date DESC) as MaxDate
    15 QQ.trdln_dim;
    of QQ.trdln_dim
    *
    ERROR on line 15:
    ORA-00955: name is already used by an existing object

    I appreciate your help. Thanks in advance!

    Kind regards
    Radic

    You must rename the table (using ALTER TABLE TableName RENAME to othername ;) before creating the MV.
    You cannot have both existing with the same name in the same schema.

    What you see in the scheme of GQ, is that the 'picture' is the underlying table for the materialized view.
    When you do a MY_MV CREATE MATERIALIZED VIEW AS...
    Oracle creates two objects with the same name, we the MY_MV materialized view, and the other being the MY_MV table, which is the physical storage. {Don't forget that a materialized view is a way to get a physical representation of views.}

    In the schema QQ is what you
    a. a real Table
    or
    b. a MV incorrectly deleted, resulting in the underlying Table always presents.

  • The use of dbms_passthrough to create a view of the

    Gurus,
    Can I create a view in oracle to access data frm a MysqlDB using dbms_passthrough. I created a procedure to get the data from the remote system to oracle db using dbms_passthrough but I was wondering if this can be done by using a view

    Published by: user10600431 on January 22, 2009 04:39

    Published by: user10600431 on January 22, 2009 05:52

    user10600431 wrote:
    Yes but I have as many functions and views on top of these tables, unless the function can be dynamic to fetch the result according to the charts.

    You can create a function with the SQL statement, or just the name of table MySql as a parameter. However, you will need to create 50 views. Something like:

    CREATE OR REPLACE VIEW view-N-name AS SELECT list-of-attributes FROM TABLE(function_name('select-from-mysql-tableN'))
    /
    

    SY.

  • create a view, the default value of the columns are NULL

    Windows XP / 10g 10.2.0.1.0

    I have a table tab1 (test1, test2, test3)

    And, I have to create a view as:
    create or replace VW1 (test1, test2, viewtest1, viewtest2) as (select test1, test2, viewtest1, viewtest2 from tab1, double);

    And need to viewtest1 and viewtest2 to be default null value column.

    Thank you.

    You are looking for something like this?

    create or replace VIEW VW1(test1, test2, viewtest1, viewtest2) as
             (select test1, test2, NULL, NULL from tab1);
    
  • customization of the form - sales order lines

    Hi all

    My requirement is to do a column not used as barcode field, during the seizure of the sales order lines, so that the user enters the bar code. The point corresponding system, description code must do this by default.

    The link between the barcode and the article is available & captured the FDF - attribute1 to the master of the order of the day.

    I used columns customer number as bar code and populated the value of the element using the customization of the form. But in the normal client command line all by choosing the item UOM is filled in automatically and by entering the quantity, the price will fill. This is not the case in my case.

    Property:

    Object type: agenda

    Target the object: LINE. ORDERED_ITEM_DSP

    Property name: VALUE

    Value: = sΘlectionner segment1

    of mtl_system_items_b

    where attribut1 = "| ${point. LINE. CUSTOMER_LINE_NUMBER.value} | "

    AND organization_id = "| ${point. LINE. SHIP_FROM_ORG_ID.value} | "

    Thank you and best regards,

    Max

    In OM responsibility, go to components-> cross reference, create a new Cross Reference Type of barcode.

    Click the Assign button.  Add an element and in the value column, put your code bar.  For bar codes, leave the 'Applicable to all associations' checked.

    Now go to the screen and control in the field of the ordered item, type the barcode value that you set up.

    Using tools folder on the command line, you can expose 'Internal Article' and 'Type of item identifier' to see that the type is 'Barcode' and it is mapped correctly your internal inventory item.

    Most of the documents will show the ordinate the question - if all your documents will also show the value of code barcode for this command.

    Here is an article with some screenshots: Johan Louwers Personal Blog "my view on the world".: Oracle EBS cross references

  • Customization of the capture Panel free article preview

    For iOS apps, how the Panel customizable purchase for measured article or protected access during free article Preview is enabled?

    By default, the purchase Panel appears as follows:-UI is dark or lighter depending on version DPS and iOS:

    free-article-preview-fig02.jpgfree-article-preview-fig03.jpg

    Entertainment Weekly however seems to have customized this Panel of purchase:

    free-article-preview-entertainment-weekly.jpg

    It seems that web viewers into the pages hosted by editor can introduce custom paywall pages; However, how can this Board be customized for iOS?

    Is - this html, or native feathers of the Viewer?

    "You're seen this issue. Buy number to access all articles"- this is the default text with the default application library built into the app. You can customize the text using chains to measure under the Options put forward in the App Builder

    App details-> advanced-> use custom channels

    http://helpx.Adobe.com/Digital-Publishing-Suite/help/create-custom-Viewer-app-iPad.html

    The other text at the end is extracted from the description field of the article-> meta-data, which can be edited from the editor of folio producer

  • Customization of the insertion in a custom user interface palette

    Greetings,

    I am working on a custom for Teststand application user interface and I want to give the user the ability to edit files in sequence using a simplified subset of the predefined types step.  I based user interface custom off the Labview FullOI example in the teststand 4.2 folder.

    I found the context menu item 'Customize' out of the palette of insertion and who seems to get most of what I'm looking for (hiding like IVI and synchronization of files and the individual steps as the FTP files and call executable), but what I really want to know, is if I can remove it to the different symbols of 'top' that choose between adapters.  I wish that the customer must only see Labview and none and RID where hide the CVI, C/C++ DLL, .NET and ActiveX.

    Where, moreover, are the options that you set in the menu customize stored user interface custom compared to the sequence editor own right?  I want to make sure that I have a good list of all of my modified files I create a CD of deployment of work later on the road.  I'm assuming that to change the visible categories in the interface custom user won't change their visibility in the application of the sequence editor.

    Personalization step insert palette changes affect the sequence editor and the user interface. The settings are stored in testexec.ini in the cfg directory.

    You can hide the adapters using the card configuration window in the config menu

    You can simply keep separate versions of your testexec.ini, one for when you want the customizations and the other for when you don't have, assuming that you do not use the machine even for both. If you use the same machine for both you can implement some sort of automated way of switching on which version of the file that you are using.

    Hope this helps,

    -Doug

Maybe you are looking for