Transformation script: create package

Hello experts,

I is currently examining the possibilities of transformation scripts in the SQL developer Data Modeler.

I'm using version 4.0.3.853 and Mozilla Rhino on a relational model.

I already understood how to create triggers and sequences in the physical model, but does not have the same approach to the package.

Create sequences:

SEQ = model.getStorageDesign () .getSequenceSet () .createSequence ();

Create a trigger:

Trigg = model.getStorageDesign () .getTriggerSet () .createTrigger ("TriggerOracle");

Following these statements, I try to create a package, but does not seem to do things.

I have already tried:

CPK = model.getStorageDesign () .getPackageSet () .createPackage ();

CPK = model.getStorageDesign () .getPackageSet () .createPackage ("PackageOracle");

CPK = model.getStorageDesign () .getPackageSet () .createPackageOracle ();

CPK = model.getStorageDesign () .getPackageSet () .createOraclePackage ();

but in all cases to get the error "TypeError: cannot find the function object packages xxx" where xxx represents the feature that I used.

When I check the documentation of the meta model, there is a createPackage method but it does not work.

Can someone help me on this? What I am doing wrong?

Any help would be appreciated!

Kind regards

Bart

Hi Peeteba,

try this one:

CPK = model.getStorageDesign () .createPackageOracle ();

Best,

Ivan Zahariev

Tags: Database

Similar Questions

  • Can we migrate Informatica transformation Scripts in Oracle Data Integrator?

    Hello

    I just wanted to know that if we can migrate/move/use the transformation scripts that build in INformatica power Center in oracle Data Integrator. (ODI).

    If 'YES' then what the tool is used to migrate.

    with impatience.

    Kind regards

    AMSI

    Hello

    Just to clarify any passage of Informatica in ODI you will have to do it yourself, like a reimplementation

    Your informatica workflow to create new package ODI (eventually plan to charge).
    Use your mappings informatica to create new ODI interface (don't forget that ODI can load only 1 target by interface table)

    Oracle Open World, this has been a hot topic in the discussions, but there was nothing still.

    Thank you

    ~ KKT ~.

  • connection to the base of a transformation script?

    Hello

    For a specific purpose, I think of a custom transformation script that would SELECT data from an oracle database. I experimented a bit with mozilla rhino (outside data Modeler), but I could not import the necessary java packages into a javascript program, no matter how to set the classpath to invocation. Then I started to wonder if it wouldn't be possible at all inside the Data Modeler. So I ask here: is it possible to connect to oracle from a custom transformation script and if yes, then what is the method?

    Hello

    Here are two examples:

    Precision of the numbers lost when importing Erwin 7.3 model

    Re: How to create foreign keys in the relational model using the Transformation

    I think that there is more on the forum, but those that should be sufficient.

    Philippe

  • Help for the dialog window "Table DDL Transformation Scripts"

    Hello world

    I'm trying to understand how to use transformation scripts. the Fund on the dialog window does not work. Is there a document describing the meaning of each of the Visual controls in this dialog box?

    In particular, I'm looking to create my own script attached to "create an after. Also plays with the 'empty' supplied script I found it's result appear if build up in the DDL result appears whenever I press the button additional Test line:

    Sincerely

    Alek

    Hi Alek,

    Thanks for reporting the problem with the generation of DDL to test. Otherwise, you can look here for more information user Oracle SQL Developer Data Modeler 4.1 - DDL generation using transformation scripts

    Philippe

  • How to use the transformation script to add columns to the PK?

    I'm working on a script transformation that:
    -create a table
    -Adds the columns to the table
    -create a primary key for the table

    See the below script.
    Now, I want to add the primary key column.
    Documentation fix r: class IndexColumnUsage

    The Index of the class has a getter: getIndexColumnUsageList()
    and the list apply: applyIndexColumnUsageList

    Someone at - it an idea how to use these methods to add the column to the PK?

    I thank in advance.


    relational = model.getDesign () .getFirstOpenRelationalDesign ();
    table = relational.getTableSet () .createTable (null);
    table.setName ("TABLE");
    column = table.createColumn (null);
    column.setName ("COLUMN");
    index = table.createIndex (null);
    index.setName ("PK");
    index.setIndexState ("primary obligation");

    Hello

    If you have the column and index (both belonging to the same table) use:

    the index. Add (Column);

    to remove the column:

    the index. Remove (Column)

    Philippe

  • Tips for the custom transformation script change the Associations of FK table

    Hello

    I try to write a transformation script that will scroll through tables in a large model and change some
    FK associations to change the remote table at CF. By the way, the reason is that our logic model
    the logical entities that represent many areas of codes of small research. However, our relational and physical model has a
    utility single physical filing table of codes that contains all areas of these codes. Therefore, a part of the transformation
    our logic model for the relational model is to swing all FK associations for these areas of research codes
    in the table of common code. Then the paintings representing the research areas can be removed from hard.

    In any case, I'm looking at the

    oracle.dbtools.crest.model.design.relational.FKIndexAssociation

    or the

    oracle.dbtools.crest.model.design.relational.Index

    to see if one of them can be manipulated to perform the transformation I want to accomplish.

    When I perform the equivalent process manually via the property sheets there are several ways to address this problem.

    (a) the method more jolise seems to change the FK in place by clicking on the FK in the relational schema and changing
    the property called ' PK / UK Index'. Change that to the pharmacokinetics of utility code repository table that replaces the original
    table (which represents the research field). A side effect of this translates into CF mapping
    columns being nulled out. They must be remapped to original columns (which are kept).
    So in two stages, the existing FK is detached from the original, attached table to the new table, and then
    FK columns are reused in place for new CF mapping.

    (b) the brute force method is to remove the original FK and then create a completely new FK to the new table. There are
    several dialog boxes that allow you to keep the original FK columns and use them in the new FK.

    I realize, this is a somewhat complex transformation, but I would like a few algorithmic advice on which path to take
    to try to achieve. In particular, there is a script that is equivalent to that of the first process above?

    I don't even know if the CF which is represented on the relational schema is represented by the FKIndexAssociation or Index
    class in the script object model. In other words, I have to loop through the tables in the relational model what would be my
    starting point:

    FKS = table.getFKAssociationsList ();

    or

    fkIndexes = table.getAllInds_FKeyInds ();

    or something else. The names of the properties in the user interface are always with the properties of scripts not so
    It's a little difficult to understand such things.

    Once I have access to the object that is equivalent to the FK in the property/diagram worksheet, which
    is the best way to handle via script. How can I change the end of parent and away from CF to point to the new table.
    Or if I have to delete the original CF and then re-create - is there a way to save the original FK columns and reuse them
    While creating the new FK?

    ********************

    Another question. What is the best way to remove tables from a relational model. I note that there is a remove() undocumented (?)
    a method that is available on the Table. It's probably a superclass to remove other things as well.

    When I try to use this method in a loop the script throws up to dialog boxes that are similar to dialog boxes that are displayed during the execution of a removal
    manually through the user interface. Is it possible to intercept and answer dialogs programmatically?
    So for example if I get a window of dialogue as

    You want to remove generated columns of FK 'FOO' in the table 'BAR '?

    is it possible to intercept this dialog in the script and then answer Yes or no it via the script?

    ***************

    If it is too difficult to perform this type of transformation with the help of script
    is to do the transformation on the generated DDL file. But it would be cleaner to
    to do the transformation in the relational model DM if possible.

    All advice appreciated.

    Rgds, BP

    When I try to use this method in a loop the script throws up to dialog boxes that are similar to dialog boxes that are displayed during the execution of a removal
    manually through the user interface. Is it possible to intercept and answer dialogs programmatically?
    So for example if I get a window of dialogue as

    You want to remove generated columns of FK 'FOO' in the table 'BAR '?

    is it possible to intercept this dialog in the script and then answer Yes or no it via the script?

    It's in the preferences - "Data Modeler > model > relational > remove FK column strategy."

    I don't even know if the CF which is represented on the relational schema is represented by the FKIndexAssociation or Index

    Is a pair of two - FKIndexAssociation, that's what you see the pattern, but it is hidden in the table index - isFK() returns true for this type of index and you can take FK with getFKAssociation()

    Once access to the object that is equivalent to the CF in the property/diagram worksheet

    table.getFKAssociations () - returns an array of the foreign keys;
    You can get to them from the relational model:
    model.getFKIndexAssociationSet () .toArray () - FK all model

    How can I change the end of parent and away from CF to point to the new table.
    Or if I have to delete the original CF and then re-create - is there a way to save the original FK columns and reuse them
    While creating the new FK?

    There should be no problem if you use the same number of columns with the same data type and order:

    get the current FK columns
    columns = fk.getColumns ();
    newRefKey is the new key question; referred and child columns must match the data type and the order in the keys - you do not ask how to get
    fk.changeKeyObject (newRefKey, columns);

    function setting in preferences, you will get the question on the columns of FK.

    Therefore, a part of the transformation
    our logic model for the relational model is to swing all FK associations for these areas of research codes
    in the table of common code. Then the paintings representing the research areas can be removed from hard.

    You can create the hierarchy of entities with the root attribute (and PK identifier) KP holding entity and entity - your look-up - empty child relationships will be these entities of the child. With the help of the transformation of the "unique Table" you will get what you are trying to achieve now with script.

    Philippe

  • How to create packages DBMS_XPLAN in oracle 9i?

    Dear

    How to create packages DBMS_XPLAN in oracle 9i? I Googled it already but I could not the solution.

    DBMS_XPLAN is part of the database. The only way to get it in 9i, AFAIK, is upgraded to a later version

  • Cannot remove index via the transformation script custom

    I want to remove through the Custom transformation script a clue, in the relational model.
    Le script runs without error by only the index is not deleted

    1. tables = model.getTableSet () .toArray ();
    2. for (var t = 0; t < tables.length; t ++) {}
    3. table = table [t];
    4. table.setDirty (true);
    5. constlist = table.getKeys ();
    6. for (var i = 0; i < constlist.length; i ++) {}
    7. constraint = constlist [i];
    8. constraint.setDirty (true);
    9. indname = constraint.getName () + "_IX";
    10. {if (Constraint.isFK ())}
    11. index = table.getIndexes () .getByName (indname);
    12. index = table.getObject (indname);
    13. If (index! = null) {}
    14. index.setDirty (true);
    15. {if (index. GetName(). Equals (indname))}
    16. the index. Remove;
    17. }
    18. }
    19. }
    20. }
    21. }

    Hello

    If you use "debug", probably you will see some of the problems you have.

    line 16 - index.remove;

    be - index.remove ();

    but you can't get there because you're wrong check:

    {if (Constraint.isFK ())}

    must be:

    {if (!) {(Constraint.isFK ())}

    other problems:

    (1) 4th place will put all the paintings as dirty

    table.setDirty (true);

    This should be moved after the removal of the index

    (2) the same for the constraint - you define constraints like salty, BTW, it is not necessary define elements of array as dirty, if the table is / will be defined as dirty.

    Script could be dangerous - make your tests on the copy of the drawing or model. Versioning can help here - after running the script and save the drawing, you can see in the outgoing changes (subject to a window changes) exactly what is changed by this script and probably undo the changes if you don't like them.

    Philippe

  • delete the index in the transformation script

    In a custom transformation script, I would delete the indexes on a table.  However, I don't see that there is no table.removeIndex function ().  Is there another way I can drop an index?

    You can use the table.remove(KeyObject key) method, passing the Index into the KeyObject parameter.

    David

  • How to use Add the media offline option when creating packages with conditioner creative cloud.

    Hi all

    AM creating packages with Creative could conditioner, need to include 'Extension Manager CS6 ' to my list of requests, I downloaded a version and trying to add to the list with the help of add the option offline media, but get the error as media is not appropriate etc...

    Can any body please let me know how to add media offline while we creating packages with Creative Cloud Packager.

    Thanks in advance.

    This is possible in theory, as long as the source media that you add is complete and unzipped. Also if 32 bit it cannot be added to a 64-bit package and vice versa.

    It's not really what this feature is designed for good. It is designed for DVD sets provided to customers who live in areas where poor internet infrastructure that cannot download apps via CCP.

  • My video of CCP series will only create packages in English?

    Hello Adobe community!

    I use the CCP to create a package with video applications:

    * Adobe After Effects CC

    * Adobe Media Encoder CC

    * Adobe Audition CC

    * Adobe Premiere Pro CC

    When I use our serial number for "Creative Cloud ENT 1.0 languages multiple platforms ONE VIDEO SN184" and chose the language: Svenska (Swedish) the created package still installs applications with English as the language. I used the packages of series and with will success created which install in Swedish (can he requests). We created the video package several times to ensuare, we have not been negligent in the creative process but also tried
    install the packages on different computers.

    Are the applications related to the video available only in English or there at - it something on our order paper for "a VIDEO SN184?
    Supplementary question: video applications, are they not available for 32-bit Windows more? they do not show with video series under media current or archived in the CCP.

    Thanks in advance
    Pontus

    Hello

    Video applications are all 64 bits only.

    About your serial number, if you ping Adobe Customer Services they will be able to check it for you. From your dashboard, go to the Support tab and you can open a case from there.

  • Why do we need create Packages?

    Packages that I know are used to group procedures. But why do we create packages when stored proc alone is sufficient.

    user10566312 wrote:
    Packages that I know are used to group procedures. But why do we create packages when stored proc alone is sufficient.

    Why do we use 3GL and 4GL languages when assembler alone enough?
    R: because it makes software development more flexible, convenient and easy to do.

    Why do you drive a car when walking alone enough?
    R: because it does fits more convenient.

    etc.

  • Creating packages

    Hello. I essentially took the example of creating package on the docs to practice on. I have the table and header package created but failed to create the body.
    /*
    CREATE TABLE 'EMPLOYEE '.
    (SELECT "EMPID" NUMBER NOT NULL,)
    ACTIVATE THE "EMPNAME" VARCHAR2 (20 BYTE) NOT NULL,
    VARCHAR2 (20 BYTE) "JOB."
    NUMBER OF "MGR."
    "HIREDATE" DATE,
    "SAL" NUMBER (8,2).
    'EMPLOYEE_PK' CONSTRAINT PRIMARY KEY ("EMPID")
    )

    create or replace
    package emp_mgt as
    Return number function hire_emp (name varchar2, varchar2, Manager number, number of wage employment);
    procedure sal_raise (int emp_id, sal_incr number);
    end emp_mgt;
    */


    create or replace package body emp_mgt as
    Number of function return hire_emp (name varchar2, varchar2, Manager number, number of wage employment)
    is
    number of newEmp;
    Start
    Select max (empid) + 1 in newEmp of the employee;
    Return newEmp;
    end hire_emp;

    I even make full hire_emp not the functionality. Make me:

    "Error (14,15): PLS-00103: encountered the symbol"end-of-file"" when awaits one of the following values: start the procedure of pragma end function ".

    The function compile outside a package.

    you are missing 2 things

    1 and END; in the hire_emp function
    2. you are missing the sal_raise procedure in the package body

    Your package body must be something like that,

    CREATE OR REPLACE PACKAGE BODY emp_mgt
    AS
      FUNCTION hire_emp (NAME            VARCHAR2,
                         JOB             VARCHAR2,
                         manager         NUMBER,
                         salary          NUMBER)
        RETURN NUMBER
      IS
        newEmp   NUMBER;
      BEGIN
        SELECT MAX (empid) + 1 INTO newEmp FROM employee;
    
        RETURN newEmp;
      END hire_emp;
    
      PROCEDURE sal_raise (emp_id INT, sal_incr NUMBER)
      IS
      BEGIN
        UPDATE employee
           SET sal    = sal + sal_incr
         WHERE empid = emp_id;
    
        COMMIT;
      END;
    END;
    

    G.

  • Is there a system table that stores scripts "create table".

    Oracle which contains the scripts 'create table' for a table of system tables defined in a schema exist?

    I know that I can build with SQL querying the user_tab_columns, but I was wondering if the overall DML
    statement is already stored in another system table. In the Toad from Quest Software, you can simply go to the 'schema', "Tables," Brower
    Then select the "Script" tab and it shows you the statement 'create table' for the table that you are
    looking at. I wonder if Toad backstage is to build this script 'create table' via the user_tab_columns
    table or using another system table.

    Thank you in advance,
    Wes

    You can use the DBMS_METADATA. Procedure GET_DDL for details regarding the ddl statement used to create the table.

  • Create Package Spec in OWB

    I couldn't find a way to create a Package specification in OWB.
    If I created the spec and body in sqldeveloper he then imported OWB
    He created the package spec and body, and I could go and change at will.

    Am I missing something?
    Is there a way to create the spec in owb.

    Thank you
    greG

    The package spec and body in OWB only for imported packages appers.
    For OWB spec (not imported) created packages generated automatically based on the specification of function/procedure that you defined for this package

    Kind regards
    Oleg

Maybe you are looking for

  • Repartition greyed, macbook pro

    Hello. I recently bought last month a new 15 "macbook pro. Installed originally 2 partitions, one for yosemite to el Captain (I didn't el Captain because it makes my computer slow, and that's what I saved from my last Mac.). After I finished pass my

  • Satellite - L300-1BW: how to check warranty registerd.

    Hello. Registerd just my warranty for my Toshiba Satellite - L300-1BW. I was wondering if there is anyway that you can go to see just how long/much guaranteed, have left you. Thank you.

  • The parallel model configuration help

    This is my first time posting, but I'm a long time reader... First of all, I consider my knowledge novice Teststand high to low intermidiate level. I created a sequence test to aid in Teststand that call labview vi. My test sequence tests 5 units at

  • How can I add another user on my computer?

    If you have a user and you want to create another user of the computer (multi-user) how I start this process?

  • Conflict graphics Photoshop CC

    Effects of light does not work in Photoshop CC. I have a HP Pavilion dv6 Notebook PC, a GEFORCE GT 650 M, 2 GB card and am running Windows 7. Have updated the Nvidia drivers on their site. (3.4.2014), as HP drivers are still 2 years. Adobe includes t