Scripts customized transformations: dynamic properties

I'm doing a script for the Data Modeler that can add a dynamic property to a table. Someone at - it experience with dynamic properties in the scripts of transformations? I already looked in the metadata XML from SQL Developer files.

Hello

I guess that what you are looking for is

tables = model.getTableSet () .toArray ();
for (var t = 0; t)<>
table = table [t];
table.setProperty ("name", "value");
table.setDirty (true);
}

Tags: Database

Similar Questions

  • Scripts customized transformations: creating sequences and synonyms

    Is there a way to Data Modeler to describe the process of creating sequences and synonyms. I have already found how to create columns in a table, but it is also possible to create sequences and synonyms for tables? I watched it in the XML metadata, but I have not found where I was looking for? Can someone help me?

    Support more will be included as part of the XML meta data in the next version.

    Philippe

  • To access the properties of entities dynamics, tables, etc. through scripts custom?

    Hi, Philip

    I am trying to use the piece of code you provide earlier for this topic 'it' collection means for properties comes empty. Any thoughts?

    Sincerely

    Alek

    Hi, Philip

    I realized what was wrong. Entity and Table have own independent series of dynamic properties. I don't know if this was the intended behavior, however. However, in this edition script works fine for me:

    ---------------------------

    DDL = "-generate the output file for"+ table.getLongName ();.

    ddlStatementsList.add (new java.lang.String (ddl));

    path = model.getDesign () .designPath;

    outFile = new java.io.FileWriter (path + "/ exit /" + table.getLongName () + ".txt");

    out = new java.io.PrintWriter (outFile);

    out. Print (DDL);

    out.println ();

    It = table.getPropertyNames ();

    {while (IT.hasNext ())}

    PName = it.next ();

    property = table.getProperty (pname);

    out. Print (pname + "=" + property);

    out.println ();

    }

    out. Close();

    ---------------------------

    Thank you and sorry for the confusion.

    Alek

  • 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

  • Dynamic properties of transfer

    Is is possible to transfer the dynamic properties of relational logic for Fwd.eng. ?

    I am also interested in their transfer between 2 models of the same type (e.g. relational)

    Edited by: t. on May 31, 2011 12:40 AM

    Is is possible to transfer the dynamic properties of relational logic for Fwd.eng. ?

    lol here's an example of how to move to their - Re: to access the properties of entities dynamics, tables, etc. through scripts customized?

    I am also interested in their transfer between 2 models of the same type (e.g. relational)

    you need to match the related objects first. As you can see in the example copies the properties itself is not a problem.
    You can get all the relational models using:
    models = model.getDesign () .getRelationalDesigns () .toArray ();

    Philippe

  • DataSource can be something unknown or custom. Its properties are not validated.

    Hello

    I found what looked like what I tried to do... data sources of QML.

    So I find this documentation: https://developer.blackberry.com/cascades/documentation/device_platform/data_access/using_data_sourc...

    I followed him all the way. But when I run my application, I get my app but no list in it. The background is white. All my items tabs and actions show. Than no list!

    DataSource {
                                id: dataSource
                                source: "assets/countries.json"
                                remote: false
                                onDataLoaded: {
                                    dataModel.insertList(data);
                                }
                            }
    

    There is an 'i' next to the data source implementation in the IDE that says: "DataSource can be something unknown or custom. Its properties are not validated. »

     

    So, what gives, ideas?

    Never mind. I will answer.

    The source must not have the 'active' before the json file. The API reference clearly states: in QML, this path is compared to the document QML in which this data source is declared.

     

    My json file in the current folder, so was not need to prefix it.

  • RH11 Registry Script customized for event parameters are not saved

    I added a script customized to my 11 RoboHelp project. In the dialog box Save event I enter my function to call and select the PostWordDocUpdate event. I then click OK , and then save it in my project. If I close the project and re - open the event is registered is no longer so I need to perform this task, everytime I open the project. Is it possible to have the registration of the registered event?

    The dialog box that show you is only for the registration of a new event. In the Script Explorer module, click the icon of a calendar with a 1 on it. This will give you a list of all recorded events. Is your event included in this list?

  • Problems with the debugger in Data Modeler Beta DDL Custom Transformation Scripts

    Hello

    I use Oracle SQL Data model Beta 4.1.0.866.

    Currently, I am working on a project to generate the models in PHP for our relational database models MVC framework. Some settings must be entered from the user,

    so, I'm importing Java classes for JOptionPane in the Transformation of the customized with DDL Scripts

    var ji = new JavaImporter(java.io, java.lang, javax.swing, java.util);

    I can use these classes with no problems, but when I want to use the debugger, it cancels the execution with this error message:

    debugger_data_modeler.PNG

    Is this a bug or am I missing something here?

    And would it not possible and even preferable to processing entirely in Java instead of JavaScript scripts?

    Hello

    Try it following the syntax:

    var ji = new JavaImporter(java.io, java.lang, Packages.javax.swing, java.util);

    And would it not possible and even preferable to processing entirely in Java instead of JavaScript scripts?

    Well, it's not on the use of JavaScript, it's scripts in Java Platform - JSR 223 https://www.jcp.org/en/jsr/detail?id=223

    So if you have a JSR 223 engine of script in the JAVA virtual machine you can use your scripting language. We simply provide a setting where you can put your scripts to do something useful.

    We don't know in advance what language will be used. JavaScript engine is included in Java6 and Java7 so this is the reason why our examples are in JavaScript.

    Using Java instead of JavaScript don't make the job easier, look at the part of import here - Re: impossible to cast objects in the Script SQL DM 4.0 Transformation

    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

  • Custom preferences or properties in Oracle Service Bus?

    Hello

    Can we have custom properties or preferences as in BPEL (bpel.preference) in Oracle Service Bus?

    We want to store a static string value that changes for every Dev/Test/Prod env

    Thank you.

    Hello

    Many use a xml/xquery file with a fixed xml and retrieve content as a transformation in your proxy service. It is quite easy and you can change the settings of the console of the OSB...

    See you soon,.

    Vlad

  • custom component - dynamic instances

    Hi - I just finished creating a custom component. During development I dragged the component on the stage in the ide and it works fine. However, now I just try to dynamically create example
    var newinstance:Mycomponent = new Mycomponent();
    I have a problem.
    Access to all my methods including disappears the addeventlistener method. Flash moaning that there is no method named addEventListener (...) etc.
    If I put my definition of the element in the first frame and method and the stuff of event listener calls in the second frame, then flash is more complaining and I can draw all the properties, etc., but events are not fired.
    So it seems there are two problems. I think the first has to do with #initclip stuff in component movieclip. Here I call this.registerClass (...) following the instructions but I have the impression from what I've read that there is something else going on in there to initialize the component when it is created dynamically. The second is something to do with eventdispatching, how did something so simple can take so much time to understand. I must be thick.

    Any help would be greatly appreciated.

    BTW, I tried using createClassComponent and attachmovie with the same results.

    AHA! -J' had the answer. In the layer actions of the first frame of your video component:

    #initclip
    Import mx.core.UIObject;
    Import MillertheGorilla.myComponentsClass;
    this.registerClass ("myComponentsClass", myComponentsClass);
    This.prototype = new UIObject();
    #endinitclip
    Stop();

    To instantiate a new component during execution:

    Import MillertheGorilla.myComponentsClass;

    var newcomponent:myComponentsClass = new myComponentsClass();
    newcomponent.createClassObject (myComponentsClass, "newcomponent", getNextHighestDepth ());

  • Reading of custom in PDM properties

    Hello

    I'm trying to read custom properties in the root of a file of PDM using Matlab with nilibddc.dll. I found two problems.

    (1) I can't read the names of the properties of file only up to 643. They are the ones on the first two lines of the first page when opened in Excel. nilibddc cannot read the rest of the properties posted 4th and 5th rows tdms open Excel file.

    (2) I can read the names of the properties of file with DDC_GETFILEPROPERTYNAMES, but how to read the values of the properties of file?

    Thank you very much!

    Hi Nathalie

    «(1) I can read the names of the properties of file only up to 643.» They are the ones on the first two lines of the first page when opened in Excel. nilibddc cannot read the rest of the properties posted 4th and 5th rows tdms open Excel file. »

    The properties displayed in the 4th and 5th rows are those of 31 groups of your file.

    I guess that those who are no longer available in the group named "user properties.

    You can call DDC_GetChannelGroups to retrieve the file channel groups.

    So DDC_GetNumChannelGroupProperties like DDC_GetNumFileProperties will return the number of properties.

    "(2) I can read the names of the properties of file with DDC_GETFILEPROPERTYNAMES, but how to read the values of the properties of file?

    To retrieve a propertyyou values need to call DDC_GetFilePropertyType (DDC_GetChannelGroupPropertyType) to determine the type of the property, and then call the function of reading according to:

    DDC_GetFilePropertyUInt8
    DDC_GetFilePropertyInt16
    DDC_GetFilePropertyInt32
    DDC_GetFilePropertyFloat
    DDC_GetFilePropertyDouble
    DDC_GetFilePropertyString

    For properties of type string, be sure, you resereved a buffer of size (DDC_GetFileStringPropertyLength).

    For DateTime (DDC_Timestamp), call the DDC_GetFilePropertyTimestampComponents.

    Please refer to the help named 'nilibddc.chm' file in the '. '. \DOC"folder for more details.

    See you soon

    Stefan

  • Add a Notification Script custom BB

    Hello

    I wish I could have custom BB according to disk space notification scripts. We have a DBA who would like to be alerted to 80%, but we want to stay in bed until at least 90% or maybe 95%. Is this possible? Also, I wish I could take all the text in the alert, leaving only the host name and the problem. We have no need for the links of the acknowledgement of receipt sent to each alert.

    Thank you

    Brandon

    Brandon,

    You can generate custom notifications from the BB management servers that are running on UNIX/Linux platforms. Custom notification scripts can be found in $BBHOME/ext/pg on the BBServer and are called by the notification rules that start with 'ext-', followed by the name of script and a hyphen 'scriptname-', followed by an e-mail address. A notification for a custom script rule might look like:

    *;; *;; *;*;*; [email protected]

    You can read all about how to create a custom notification script by launching the BBServer online help documentation and search for 'Create a custom notification Script'.

  • AutoVue Office: syntax to specify a file of .gui custom in the .properties files

    Hello.

    My company must specify a menu custom for some users.

    We do not use the client desktop application built-in but Autovue

    It is possible to specify a custom file 'users.gui' in a property like 'autovue.properties' file, in order to distribute tho files on already installed customers.

    If I ' am on the wrong means to tell me.

    Thanks in advance

    Hello

    When you use AutoVue Desktop Deployment, you can specify the GUI file customized in the autovue.properties file by using this option:

    param - GUIFILE = mynewguifile.gui

    It should be added to autovue.cmdline.

    Also the new GUI file should be in your folder "\bin\Profiles".

    Thank you

    Daniel

  • Scripts custom FDM HFM control (for example, perform a translate in HFM) after data FDM load via the batch Loader

    Currently, we have a Microsoft Access database + VBA Scripts that use the HFM API objects to connect to the HFM application to perform the following tasks:

    (1) delete the data according to a specific POV HFM

    (2) load some data from a text file to the request of HFM

    (3) run a Consolidation of data in HFM with 3 different POV

    (4) running a data translate in HFM with a specific POV.

    (5) when the process is complete, HFM send one connects e-mail to Hyperion administration team with newspapers.

    We want to replace this database MS Access with FDM.

    Custom script of FDM, I am able to run batch loader to load data at our request of HFM.

    However, FDM, I want to connect to our HFM application to perform a consolidation (in HFM) and also a Translate (in HFM) after that the data has been loaded by the loader of FDM data.

    The question I have is that I can't use the VB Scripts following FDM (this code works in MS Access)

    Function OpenHfmApp (sDomain As String, sUser As String, fun As String, sserveur As String, sApp As String)

    Dim customer as HsxClient

    Dim cSession as HsvSession

    Dim cServer As HsxServer

    Set customer = New HsxClient

    cClient.SetLogonInfoSSO sDomain, sUser, ' ", fun

    sApp sserveur, 'Financial management', cClient.OpenApplication, cSession cServer

    Set OpenHfmApp = cSession

    End Function

    FDM do not like the 'AS' - I should write:

    Function OpenHfmApp (sDomain, sUser, fun, sserveur, SAPP)

    Sun customer

    Dim cSession

    Dim cServer

    Set customer = New HsxClient

    cClient.SetLogonInfoSSO sDomain, sUser, ' ", fun

    sApp sserveur, 'Financial management', cClient.OpenApplication, cSession cServer

    Set OpenHfmApp = cSession

    End Function

    When I run this code of FDM, I get the following (of Financial Data Management Workbench) error message

    500 variable is undefined: 'HsxClient '.

    Online: 565

    My questions are:

    (1) is it possible to control via the Scripts VB FDM HFM realize some tasks such as claire HFM, Consolidation and HFM HFM translate?

    (2) if so, How can I reference objects in FDM HFM VB Scritp editor [custom general] (to use the HFM API via scripts VB FDM objects)?

    Thank you

    Claude

    Good to know that the 'out of the box' functionality meets your requirements. You can mark the thread as anawered now.

Maybe you are looking for