Renaming / deletion model leaves the table

Hello

When you use OracleUtils to rename a model, table, on which the model is based remains the same.
I don't know whether the expected behavior, but it raises a question.

Lets say a template has been created through before ModelOracleSem with the name of 'Test '. A table "Test_tpl" was also created.
Then, you call:
OracleUtils.renameModel (oracle, "Test", "Test2");

The model is renamed successfully, but the underlying table is 'test_tpl '.
The problem is that if you try to create a new template called "Test" through ModelOracleSem.createOracleSemModel, it fails with the following result:
java.sql.SQLException: none of these RDF models: TEST
at oracle.spatial.rdf.client.jena.GraphOracleSem.retrieveModelId(GraphOracleSem.java:1889)
to oracle.spatial.rdf.client.jena.GraphOracleSem. < init > (GraphOracleSem.java:1074)
to oracle.spatial.rdf.client.jena.GraphOracleSem. < init > (GraphOracleSem.java:705)
to oracle.spatial.rdf.client.jena.GraphOracleSem. < init > (GraphOracleSem.java:528)
at oracle.spatial.rdf.client.jena.ModelOracleSem.createOracleSemModel (ModelOracleSem.java:75)

I used the following workaround solution:

OracleUtils.renameModel (oracle, oldModelName, newModelName);
oracle.executeSQL ("RENAME" + oldModelName + "_TPL OF" + newModelName + "_TPL");

But how can I be sure that the underlying table is indeed oldModelName_TPL?

Thank you
Concerning

Julien

Hi Julien,

This is the expected behavior. The main reason is that, as a general rule, there is no clear correlation between the application table name and the name of the model. However, in the adapter Jena, unless otherwise stated in the GraphOracleSem constructor, the table name is given as [NomModele] _TPL (same with the table names: _NS [NomModele]).

So, if you use the Jena adaptor, your solution is very good - I would recommend renaming the namespace table as well.

Also, you can use the GraphOracleSem.getApplicationTableName () function before you rename it for sure.

Kind regards
Vladimir

Tags: Database

Similar Questions

  • How to capture what oracle object delete rows in the table?

    Hi all

    I have a table in which I am storing data deleted from the main table. I have a delete on the main table statements in the various packages, now I want to capture what sql statement what package is remove rows from the table. I created the trigger to insert data into the backup table. I'm using oracle 11g.

    Please help me...

    Thanks and greetings

    Vidyasagar.B

    You can use DBMS_UTILITY.FORMAT_CALL_STACK.
    
    SQL> create table t
      2  (
      3    no integer
      4  );
    
    Table created.
    
    SQL> create table t_log
      2  (
      3    str clob
      4  );
    
    Table created.
    
    SQL> create or replace trigger t_trig before insert on t
      2  begin
      3     insert into t_log(str) values (dbms_utility.format_call_stack);
      4  end;
      5  /
    
    Trigger created.
    
    SQL> create or replace procedure p
      2  as
      3  begin
      4    insert into t (no) values (1);
      5  end;
      6  /
    
    Procedure created.
    
    SQL> create or replace package pkg
      2  as
      3     procedure run;
      4  end;
      5  /
    
    Package created.
    
    SQL> create or replace package body pkg
      2  as
      3     procedure run
      4     is
      5     begin
      6       p;
      7     end;
      8  end;
      9  /
    
    Package body created.
    
    SQL> exec pkg.run
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from t_log;
    
    STR
    --------------------------------------------------------------------------------
    ----- PL/SQL Call Stack -----
      object      line  object
      handle    number  name
    3abbbc6d8         1  anonymous block
    3ad03bf88         2  KARTHICK.T_TRIG
    3a51a18a8         4  procedure KARTHICK.P
    3ac4f1508         6  package body KARTHICK.PKG
    3ac91c250         1  anonymous block
    
  • modeling of the table partitions

    Hello

    How to define partitions in oracle data maker? If it is defined in the relational or physical model (11g)?

    The table will store millions of cities linked to about 20,000 documents. I want to create a partition on the name of the city?

    Please advice...


    Hello

    Partitioning is defined in the physical model of the Oracle.

    Open the Table Properties dialog box in the physical model and set its property to partitioned on YES.

    You can then go to the partition tab in the dialog box.  You must set the Partition Type (of the LIST) and add the column containing the name of the city to the selected columns list.

    After you close this dialog box, you can, if you wish, define individual partitions.

    To do this, you should expand the node of the Table in the physical model tree and then right-click on its node of Partitions and select the new option.

    This will display the properties of Partition dialog box, where you can provide a list of one or more city names in the list of values property.

  • Delete rows from the table

    Hello

    10G

    A custom table is to have 5000 documents, I need to have everything 100 records in the table and delete the rest of them.
    could you suggest...

    Thank you
    Tim
    delete table_name where rowid not in (select rowid from table_name where rownum <101);
    
  • SeriesInterpolate - delete data in the table early

    Hi all

    I did experiment with the graphics available in Flash Builder 4 and I like the capabilities of the cards, but have run into an area that didn't work quite as I expected. Specifically, when adding and deleting of data point to a table with SeriesInterpolate defined.

    I've set up three examples, I guess these will do much more reasonable that I try to explain it in words only! :

         - http://sprymedia.co.UK/media/Misc/Flex/LineChart/LineChart-Add.swf

    -By clicking on the button at the top right adds a new point of data at the end of the data table, and the table is correctly updated (almost smooth there is a change of 1px at animation which is strange...)

         - http://sprymedia.co.UK/media/Misc/Flex/LineChart/LineChart-delete.swf

    -By clicking on the button (which is now incorrectly labeled) removes the element at the beginning of the table data - but the chart draws it as if he was removing the end element.

         - http://sprymedia.co.UK/media/Misc/Flex/LineChart/LineChart-AddDelete.swf

    -C' is what I'm aiming eventually for - a smooth side scroll graphic, when new data are added at the end and the old data are dimmed on the front. However, the delete behavior makes this look a little weird.

    Is there a way to get a smooth transition I am looking with SeriesInterpolate? Or she and be implemented in a different way?

    Thank you very much

    Allan

    Hi Allan,

    Yes. Set of cards code is part of open source for Flex 4. Latest version of the SDK can be downloaded from http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4

    Thank you

    Deeptika

  • How to model in the tables of aggregate SPR with different years of data

    Can someone let me know how to accomplish the following in OBIEE?

    I want to create a table of logical facts with multiple sources of logical table. I have a global table that only stores the data of the current year. OBIEE, if a user creates a report using data from the current year, I hit the global table of the query. However, my facts database table stores data annually. If a user creates a report using data from previous periods, I want the application to hit the base of facts table.

    And if you're curious, that the aggregate contains only data of the current year as the ETL needs to do a full charge every night because of the complexity. The high volume of data and the amount of time it takes to complete this comprehensive way we only have time to fill in the data of the current year.

    Thanks in advance.

    Hello

    See Fragmentation in the link below

    http://108obiee.blogspot.com/2009/01/fragmentation-in-OBIEE.html

    Kind regards
    Sandeep

  • Delete the row in the Table by using the report link column

    Hello

    I a report advocating the rows in a table - I would like to for users to be able to delete rows in the table by clicking on the link in the column "ID". I thought about trying to call a process by using a javascript URL (as mentioned in this thread - Re: how to call PL/SQL process when you press link column ) but I don't know how to write the process so that he knows what 'ID' to remove from the table.

    Any ideas would be greatly appreciated.

    Forrest

    Forrest:

    Follow these steps

    Create an item hidden on the page P_ID named who said
    In the column link definition set the goal URL as the URL as
    JavaScript:doDelete(#ID#);
    Add this JS ito header HTML of the page

     
    

    Create a process page ' on submit ' with the code to delete the record from the table. Subordinate this process by using a "pl/sql expression" type of condtion. Will be the expression of pl/sql

    :request='DELETE';
    

    Treat code

    delete from  where pk_column=:p_id; //adjust as needed 

    Add a branch that branches off to the page

    CITY

  • Apply the Style to the table using Extendscript CC cell text

    Hello

    I have the following code. I try to scan a document and a specific keyword research based on the regex. That part works. I then get the range of text for those keywords and the highlighted text. This method works. What does not work, it is when I try to do the same in the text that is in a table cell.

    #target framemaker
    
    var doc = app.ActiveDoc;
    var totalPgfs = 0;
    
    var pgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
    
    function do_table_work(pgf){
        var result = pgf.GetText(Constants.FTI_TblAnchor);
        var all_text = '';
        for (var i = 0; i < result.length; i += 1) {
            var t_object = result[i].obj;
            var t_cell = t_object.FirstRowInTbl.FirstCellInRow;
            while(t_cell.ObjectValid()){
                var cell_items = t_cell.GetText(Constants.FTI_String);
                var tr = new TextRange();
                 tr.beg.obj = tr.end.obj = pgf;
    
    
                 tr.beg.offset = 0; //this is built dynamically
                 tr.end.offset = 7; //this is built dynamically
    
                apply_char_format(text_range)
                t_cell = t_cell.NextCellInTbl;
            }
        }
    }
    
    function apply_char_format(text_range, name) {
        var color = doc.GetNamedColor(name);
        if (color.ObjectValid()) {
            var set_val = new TypedVal();
            set_val.valType = Constants.FT_Integer;
            set_val.ival = true;
            doc.SetTextVal(text_range, Constants.FP_UseBkColor, set_val);
    
    
            set_val.valType = Constants.FT_Id;
            set_val.obj = color;
            doc.SetTextVal(text_range, Constants.FP_BkColor, set_val);
        } else {
            alert('Color does not exist');
        }
    }
    
    while (pgf.ObjectValid()) {
        do_table_work(pgf);
        pgf = pgf.NextPgfInFlow;
    }
    

    The problem is that it is not highlighting the text in the table cell as I want it. If I process the document and use the following syntax:

    var result = pgf.GetText(Constants.FTI_String);
    

    It will highlight the text (with extra code to loop through these results).

    Any thoughts on what I'm missing?

    Hi Green,

    I don't have time to debug this script completely, but I see things that seem unusual.

    1. var result is TFP. GetText (Constants.FTI_TblAnchor);
    2. var all_text = ";
    3. for (var i = 0; i)< result.length;="" i="" +="1)">
    4. var t_object = .obj result [i];
    5. var t_cell is t_object. FirstRowInTbl.FirstCellInRow;
    6. While (t_cell. {ObjectValid()})
    7. var cell_items is t_cell. GetText (Constants.FTI_String);
    8. var b = new TextRange();
    9. TR. Beg.obj = tr.end.obj = bmp;

    GetText() is valid for a table cell, I don't know if that's what you want. I think I want to explore the individual paragraphs. I'm not quite clear on what this code does do exactly, but it seems that this would make it much easier to implement the text ranges. GetText() will cover all the paragraphs in a cell, if there are several.

    Added to this, your line "tr.beg.obj = tr.end.obj = bmp;" makes no sense to me, because you're coming back the paragraph which contained the anchor point of the table. In other words, you just leave the table entirely.

    So it's just a few riddles, but it seems more likely that you would something along these lines:

    1. var t_cell is t_object. FirstRowInTbl.FirstCellInRow;
    2. While (t_cell. {ObjectValid()})
    3. var cellPgf is t_cell. FirstPgf;
    4. var cell_items = cellPgf.GetText (Constants.FTI_String);
    5. var b = new TextRange();
    6. TR. Beg.obj = tr.end.obj = cellPgf;

    Hope this helps some.

    Russ

  • the date format when downloading Excel at the table of the ADF.

    Hello

    Am using jdeveloper 11.1.1.6.0

    Downloads some data from Excel to my adf:table.

    In my excel I have a Date column, which has the date in the format of ' mm/dd/yyyy hh: mm: a ' (01/12/2013-04:33). I need the same format to download in my af:table.

    This is the code that I used my bean.

  • Formatter DateFormat = new SimpleDateFormat ("mm/dd/yy hh: mm");
    Say string = theToken;
    Date date1 = formatter.parse (say);
    System.out.println ("///Date///" + date1);   Here're the value that

    Kill Jan 01 05:19 IST 2013


    rw.setAttribute ("Date1", date1);

    But in my page user interface, it just shows as dd/mm/yyyy.

    The Date in my af:table attribute is TimeStamp (6).

    Kind regards

    Prasad K T,.

    + 919840021070

    Prasad,

    Your models are not added. The abbreviation for months is "MM" not "mm". If excel uses a specific model, why don't you use the same to analyze the data?

    Then write the date in a table and display it on a page are different actions. You must specify to the timestamp for the model in the table.

    Timo

  • OBIEE 10G - repository Business Model adding fact Table

    Hello

    I tried to search the forum for problems similar to this one, but did not find any thread that responded to my doubts.

    I'll try to explain this very well (without images it's complicated). Suppose we have a schema with the following tables:

    Dim_1, Dim_2, Dim_3, Dim_4, Dim_5, Fact_1, Fact_2

    Fact_1 is connected to Dim_1, Dim_2 and Dim_3
    Fact_2 is connected to Dim_2, Dim_3, Dim_4 and Dim_5

    And on the business of the repository model, we already have a model with the following tables:

    Dim_1, Dim_2, Dim_3 and Fact_1. It was the State of the repository, the last time that we have saved.

    Now, I want to add to the activity model, the table Fact_2 and the Dims that connect with Fact_2. What should I do here?

    If I drag the physical layer only the tables (Dim_4, Dim_5 and Fact_2 like Dim_1 and Dim_2 already exist in the business model) when I check on the business model of the table Fact_2 and direct joins diagram I see only joins Dim_4 and Dim_5 and not joined to the other two dimesion tables (Dim_1 and Dim_2). I don't know if OBIEE will always act as these joins are made or if I'm having problems when I'm working on presentation services.

    If I drag the physical layer, the tables (Dim_2, Dim_3, Dim_4, Dim_5 and Fact_2) I'll see all the joins, but I'll have on repeated business model tables, something like this:

    Dim_1, Dim_2, Dim_2, #1, Dim_3, Dim_3, #1, Dim_4, Dim_5, Fact_1 and Fact_2

    So what is the solution here? I have to redo everything I want to add something, and this situation occurs? Isn't his smart and there must be a better solution. I know that I can start direct joins manually, but that is the best solution that I can find in this situation?

    I hope that I was clear :)

    Thank you

    Hello

    I have proposed this approach because your layer of MDB was already designed with fact1 joins. If you have already designed MDB, once you drag fact1, fact2 & Sun 1-5 (after physical joins) complex join will be automatically created in MDB. Now that you're at halfway, it is the only way to include the tables.

    Rgds,
    DpKa

  • I can't understand the reasoning behind the tables to ID CS5. Can you help me?

    I can make tables ID CS5 works, but I do not understand how they work. I should mention that I am a heavy user of FrameMaker, so I'm sure I have some faulty assumptions.

    In FrameMaker, I'm used to the use of the table styles to automate the formatting of the table. All the table set in the form of information - for example, styles of text for titles table, headers, and body; rules; intercellular. etc. - is built in the style of table and applied with a single click. The text style information drawn from pre-existing paragraph styles that are associated with the table style. All very simple. But in InDesign, things seem much more complicated.

    InDesign a of table and Cell Styles. I'm not clear on the relationship between the two. You can specify to power and styles of shading in both. I don't understand this.

    I got more predictable results, with cell Styles, so I took most of my formatting information. But Cell Styles are not autonomous entities. Even if you create them, then add them to the Style Table, they must be associated with a pre-existing paragraph style. This looks like a duplication of efforts - two distinct styles (cell and paragraph) apply the same text formatting information. The cell Style includes power and info of the shading, but that shouldn't be necessary since that information can theoretically be entered in the Style of the Table.

    In addition, Cell Styles using limits you to the style of a paragraph per cell. In some cases, I need two - data or text, followed by a few chips. When this happens, that I had to remove the cell Style and directly apply a paragraph style. Looks funky.

    I don't want to get too deep into the weeds with specific puzzles I encountered; It is sufficient to say that I do not understand how the table and Cell Styles interact and how best to use them to create and format tables efficiently. Does anyone of you understand the reasoning behind the ID tables? Can you provide a source that explains it? There must be a system, a set of operating principles that are consistent, but I was not able to discern them.

    Sincere thanks,

    -Donna Reynolds

    Hi, Donna.

    I don't know a good reference for how table styles fit together, but I think that your problems would be solved more easily if you gave a specific example of what was confusing you.

    It is true that there is overlap between the table and cell styles. This is because they are modeled on the Table Options and Options of the cell, and there is an overlap. For example, the shot of the table and the outer race of the external cells are the same things.

    Most of the time, you can avoid this confusion - in the Style of your Table, do not define anything except for where you need to replace your cell style information, such as the outside of the table. You cannot set the padding on a style to a table in the table, because you cannot set the padding in the Table Options. Except for the stuff that relates to the entire table, such as the alternation of the contours of row/column.

    So set your fillings in cell styles and use this style in the Style of the Table.

    In your cell styles, do not specify a paragraph style. Use (ignore). It is important that a cell should dictate a particular paragraph style, then use it. But it's probably him better not reach otherwise.

    Is it that help at all?

  • Display the option button if the number of rows in the table is equal to 1

    I'm having issues there buy maybe a simple script out there.

    I have a table which can have up to four lines. If the table contains only one row, an option button can be clicked to change the format/entry of cells in this row. I have to hide this box of a user option, if they added more of a line to the table and make it available again if they reduce the number of lines to one.

    I have everything else works well (radio buttons change line format, add/delete rows in the table using buttons, number of rows in the first column)

    Anyone have any ideas?

    See you soon

    Bobby

    You can place it in the code that adds more lines when running... If you have questions send the fomr to [email protected] so I can check it out...

    Thank you

    Srini

  • Problem with the removal of the first row of the table

    Hi all

    I have a problem with my forms with tables where I have buttons to add or remove rows from the table. Adding the lines works fine but deleting lines has a problem when deleting the first row. Example: Here is a table with two rows where column 1 has the add and remove buttons and column 2 user imput that looks like this:

    Column 1
    Column 2
    Add and remove buttons hererank 1
    Add and remove buttons hererank 2
    Add and remove buttons hererank 3

    If the user deletes line 2 the table looks like which is correct:

    Column 1
    Column 2
    Add and remove buttons hererank 1
    Add and remove buttons hererank 3

    If the user deletes line 1 then the table looks like which is false since the ranks 2 and 3 should be left:

    Column 1
    Column 2
    Add and remove buttons hererank 1
    Add and remove buttons hererank 3

    The code is pretty simple:

    Table3.row2.instanceManager.addInstance (1); for the click event of the button Add line

    Table3.row2.instanceManager.removeInstance (1); for the click event of the button Delete line

    What I am doing wrong?

    Thanks in advance!

    Al

    The expression will be based on your structure... done .This refers to the current object, parent refers to the container parent of this object and index is the index of this object. So watching your hierarchy and from the key, you will need this.parent to join the line subform is it in (usually it is th esubform that repeats). If it's in a subform, you will need to add another parent. Continue on this road until you get to the repeating subform and then ask its index. Your expression might look like this.parent.parent.parent.index. Using this.index, you find the instance of the button object and there are just people and that's why you always get 0.

    Make sense?

    BTW your form is attached not... so I can't check what you should put it.

    Paul

  • Cut and paste the tables of a project to another

    When cut and paste existing tables from one project to another, the weight of the line for the cell borders appear to vary randomly - some are the original line weight and some are heavier when pasted.

    I tried to unravel with the properties of the table, but without result dialog.

    Is there a quick fix or I'm better import in all subjects, then changing any theme?

    Hi Colum/Peter,

    It is not a custom table, I just need to copy a table from one project to the other.

    Blasted my developers (may the fleas of a thousand camels, etc), recently decided to change toolbars in one of our applications. As this toolbar appears in slightly different forms in about 6 tabs, I tried to update the table that shows which icon does what and cut and paste this table in all subprojects that I. Each table then needs only a minor modification for some this subproject-specific icons.

    Peter on the right track. When I cut and glued to the table, it is also stuck in a number of lines of HTML associated with styles in the other project. If I delete these lines, the table will appear as it should.

    Thanks for the quick reply

  • Deletion of the tables of the ODM

    Assuming that I am done with my project parts (for example, classification), it is OK to delete tables such as those starting with DM$ P * CLAS, etc.?

    When is it OK to remove the tables starting with ODMR$?

    Hi Cindy,.

    If you use Data Miner then cleaning can be done automatically.

    If you remove a workflow Data Miner - all objects created by the workflow are deleted (as templates or tables generated by the node Create Table).

    No input source is deleted because they were not created by the workflow.

    If the workflow would both eliminate the tables/views ODMR$ (which are generated internally by ODMr in the model test results etc.) and the tables of DM$ P (which are physical tables within the model of the ODM itself).

    If you delete a node in a workflow, then objects created by this node disappears when the workflow is saved.

    If you drop the Data Miner repository, the fall process deletes all the objects thus generated workflow.

    You can also keep the workflow and physically remove all the underlying tables in the range $ ODMR but recognize that you will need to restart the workflow as always, they will be marked as complete, but the results have been removed.

    You don't really have to remove the DM tables $ P directly (see below).

    If you build models outside ODMr, the you must use the pl/sql api to abandon the model:

    DBMS_DATA_MINING. DROP_MODEL (model_name IN VARCHAR2,

    Force IN BOOLEAN DEFAULT FALSE);

    If you have a number of models to remove, you can write sql script to query the view of models of mines dictionary and use it as a driver to drop patterns.

    Hope this helps, Mark

Maybe you are looking for