Using the eval() function in Table DDL Transformation Scripts

Hello

I would like to run a stand-alone file java script in the script after you create and the events of the end of the Script. According to the Oracle documentation, there are several ways to do so: https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/prog_guide/api.html

Only the first way seems to work:

Suggestions, please

Alek

Hi Alek,

you try to use the JavaScrpt JavaScript eval() function eval() function

and as I see that it works as expected. You need to get your engine and use the eval function.

Following works for me:

var manager = new Packages.javax.script.ScriptEngineManager();
engine = manager.getEngineByName("nashorn");
s = engine.eval("1+2");
fr = java.io.FileReader("d:/temp/inc.txt");
k = engine.eval(fr);

Philippe

Tags: Database

Similar Questions

  • 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 operate the user defined table ddl transformations?

    How can I run (Oracle Data Modeller 4.1.0.873) my transformations of the user-defined table ddl (for the creation or - map source files). (In tools-> rules of design and Transformations-> Table DDL transform his only Test and debugging for an entity)

    Is it possible to have a new button in the toolbar to start my generations DDL?

    Hello

    There is a brief description in the file sqldeveloperdatamodelerscripting.docx located in the directory datamodeler\datamodeler\xmlmetadata\doc of your DM 4.1 instalation.

    Somehow you can read also here Oracle SQL Developer Data Modeler 4.1 user - defined DDL generation using transformation scripts

    You can use the script for the purposes of testing only, otherwise the output of this script will be included in the DDL if script 'Active' selected value and ago marked to be included in this generation of tables

    Philippe

  • Using the comparison function where 2 data tables various types

    Is it possible to use the comparison function in Labview you to compare 2 arrays of types of different data (e.g. Boolean and double-precision)?

    Would this work?  Nested for loops of index on the TRUE values of the Boolean table.

  • How can I use the BCGTransform function to treat the 16-bit Image?

    Hi ~

    I use LabWindowsCVI8.5 and NI Vision to make the treatment of the Image. When I read the "IMAQ Vision for LabWindowsCVI Reference Manual", I found that the imaqBCGTransform function only supports 8-bit Image, while I do the BCG to turn on 16-bit image. Are there solutions to use the BCGTransform function to deal with the 16-bit Image? Or any other feature that could make the correction Gamma, contrast and brightness on the 16-bit Image?

    Thank you very much!

    because imaqBCGTransform is implemented as a lookup table, we can understand why it is limited to 8-bit images.

    Now let's take a look at the definition of each of this mandate (from the NI Vision Concepts documentation):

    -brightness: a constant added to the components red, green, and blue pixel of color over color, decoding of the process;

    -contrast: a constant multiplication factor applied to the components of the luma and chroma of a pixel of color in color to decoding process.

    -gamma correction: expand high gray-level information in an image while removing information of low level of gray.  (the chapter on lookup tables gives some examples of corrections gamma)

    now that you understand that this transformation is a simple mathematical function, simply calculate the correction for each pixel on your 16-bit images.

    I know not the exact formula used by the imaqBCGTransform function, but you should be able to approach by performing some tests on images 8 bits with the original function... or you can make your own formula... or find one on the net... or you can ask someone at home OR you give the formula...

  • How do we use the SUBSTR function in OWB

    Hello, I'm pretty new to OWB. I need to use the SUBSTR function in owb. My source table has 16 characters in length. But in my datamar,.
    the length is 14 years. I want to the substring from source to the destination. The mappings are already developed. I need to change the mapping to make sure that,
    It brings only SUBSTR (1.14) mini - DW.

    Any help is appreciated.

    Use the operator of expression between two attributes.

    OWB has already SUBSTR as a preset transformation

    Take a look at the doc below
    26.3.1 open the expression builder

    http://docs.Oracle.com/CD/E11882_01/OWB.112/e10935.PDF

  • How to copy an image that is in format .pdf using the paint function paste in Word?

    I would like to copy a table that is in a non-protected PDF document using the paint function in accessories to paste it in a Word document that I'm working on. Please help as soon as POSSIBLE.

    Hello, Edward Namalima,.

    1. first open the pdf page you want to copy.

    2. when the page is displayed on your screen, press prtscrn on your keyboard.

    3. a copy of the screen has now sent in the windows clipboard.

    4. now open Paint.

    5. on the Paint toolbar, click on edit and then click on paste. The image will now be pasted in a Paint window. You may need to accept a dialog resize if the image is larger than the current document.

    6. now, from the toolbar to the left of your screen, click on the Selection (the oblong dotted box) tool. With the selection tool, select the entire surface of the table you want to copy. Once selected, click on modifier change again, then select Copy.

    7. now, open Microsoft Word.

    8. then place the cursor where you want the table to set, and then press the CTRL and V together on your keyboard.

    9. the image of the table should now be pasted into your Word document.

    Alternatively, you can use the cutting tool (click on the Start button and type snipping tool in the search field). Select the table you want in the pdf page using the cutting tool and then open word and paste the table in word.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Expert - consumer: www.winuser.co.uk |  vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com

  • SQL using the analytic function


    Hi all

    I want a help in the creation of my SQL query to retrieve the data described below:

    I have a test of sample table containing data as below:

    State ID Desc

    MICHAEL 1 T1

    ACTIVE 2 T2

    T3 3 SUCCESS

    DISABLE THE T4 4

    The thing I want to do is to select all the lines with an ACTIVE status in the table but is there is no ACTIVE status, my request will give me the last line with MICHAEL status.

    I can do this in a single request by using the analytical function for example, if yes can yiu help me on the request of unpacking.

    Kind regards

    Raluce

    Something like that?

    I had to fix it.

    with testdata until)
    Select 1 id, "T1" dsc "DISABLED" status of Union double all the
    Select 2 id, 'T2' dsc, the status "ACTIVE" of all the double union
    Select id 3, "T3" dsc, the status of 'SUCCESS' of all the double union
    Select 4 id, "T4" dsc "DISABLED" status of double
    )

    Select
    ID
    dsc
    status
    of testdata
    where
    status =
    -case when (select count (*) in testdata where status = 'ACTIVE') > 0
    then 'ACTIVE '.
    Another 'DISABLED '.
    end
    and)
    ID in (select id from testdata where status = ' ACTIVE')
    or
    ID = (select max (id) in testdata when status = 'DISABLED')
    )

    STATE ID DSC

    '2' 'T2' 'ACTIVE '.

    Maybe it's more efficient

    Select
    ID
    dsc
    status
    of testdata
    where
    status =
    -case when (select count (*) in testdata where status = 'ACTIVE') > 0
    then 'ACTIVE '.
    Another 'DISABLED '.
    end
    and
    ID =)
    -case when (select count (*) in testdata where status = 'ACTIVE') > 0
    then id
    on the other
    (select max (id) in testdata when status = 'DISABLED')
    end
    )

    Post edited by: correction of chris227

    Post edited by: chris227
    extended

  • How to use the NVL function to a parameter with comma delimited values

    Gurus,

    It is confusing to me.  I am trying to use the NVL function, but the setting that I'm passing in my cursor contains multiple values with commas.  The NVL function is confused when analyzing the values.

    'Where' cursor clause...

    and nvl (sn.c_attribute1,'x@#$%') in nvl (p_desig,'x@#$%'( )

    translated parameter values...

    and nvl (sn.c_attribute1,'x@#$%') in nvl ('SPRT''GOOD' 'BAD' 'x@#$%') -NVL does not parse the value correctly

    Any idea on how to get NVL recognize 'x@#$%' , if p_desig is null?

    Thank you

    Scott

    HI, Scott.

    Whenever you have a problem, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) of all the tables involved, so that people who want to help you can recreate the problem and test their ideas.

    Also post the results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002#9362002

    My best guess, based on what you posted bone is present, that your problem is discussed in the following:

    http://tkyte.blogspot.com/2006/06/varying-in-lists.html

    http://www.Oracle-base.com/articles/Misc/DynamicInLists.php

  • help in the application without using the pivot function

    Hi gurus,

    Can you please help write the query without using the PIVOT function.
     WITH indata AS
             (SELECT 1 sn, '123:456,789,323:456,213,344,345:5454' x
                from dual
              UNION ALL
              SELECT 2, 'abcd:fgrfr,rfrf,rfred,tg:tg,tg:ophhh,op,vdfgbh:poijn' x from dual),
            instr AS
             (SELECT a.SN,
                     rownum RN,
                     B.column_value || CASE
                       WHEN B.column_value NOT LIKE '%:%' THEN
                        ':'
                     END column_value 
                FROM indata a,
                     TABLE(CAST(multiset
                                (SELECT trim(SUBSTR(x,
                                                    (CASE LEVEL
                                                      WHEN 1 THEN
                                                       1
                                                      ELSE
                                                       instr(x, ',', 1, LEVEL - 1) + 1
                                                    END),
                                                    (CASE instr(x, ',', 1, LEVEL)
                                                      WHEN 0 then
                                                       4000
                                                      ELSE
                                                       instr(x, ',', 1, LEVEL) - 1 -
                                                       (CASE LEVEL
                                                          WHEN 1 THEN
                                                           0
                                                          ELSE
                                                           instr(x,
                                                                 ',',
                                                                 1,
                                                                 level - 1)
                                                        END)
                                                    END)))
                                   FROM dual
                                 CONNECT BY level <=
                                            LENGTH(x) -
                                            LENGTH(REPLACE(x, ',', '')) + 1) AS
                                sys.odcivarchar2list)) b)
            SELECT  col1_val2,
                    col1_val1,
                    col2_val2,
                    col2_val1,              
                   systimestamp
              FROM (select SN,
                          ROW_NUMBER() over(partition by SN order by RN) RN,
                           SUBSTR(column_value, INSTR(column_value, ':') + 1) VAL1,
                           substr(column_value, 1, instr(column_value, ':') - 1) val2
                      FROM instr ) PIVOT(MAX(VAL1) VAL1, MAX(VAL2) VAL2 FOR SN IN(1 as col1,2 as col2));
    Thanks in advance!...

    Any help would be appreciated.

    user590978 wrote:

    Can you please help write the query without using the PIVOT function.

    with indata as (
                    select 1 sn,'123:456,789,323:456,213,344,345:5454' x from dual union all
                    select 2, 'abcd:fgrfr,rfrf,rfred,tg:tg,tg:ophhh,op,vdfgbh:poijn' x from dual
                   ),
             t1 as (
                    select  x
                      from  indata
                      where sn = 1
                   ),
             t2 as (
                    select  x
                      from  indata
                      where sn = 2
                   ),
             t3 as (
                    select  level lvl,
                            substr(
                                   x,
                                   instr(',' || x,',',1,level),
                                   instr(x || ',',',',1,level) - instr(',' || x,',',1,level)
                                  ) col1
                      from  t1
                      connect by level <= length(x) - length(translate(x,'A,','A')) + 1
                   ),
             t4 as (
                    select  level lvl,
                            substr(
                                   x,
                                   instr(',' || x,',',1,level),
                                   instr(x || ',',',',1,level) - instr(',' || x,',',1,level)
                                  ) col2
                      from  t2
                      connect by level <= length(x) - length(translate(x,'A,','A')) + 1
                   ),
             t5 as (
                    select  lvl,
                            substr(col1,1,instr(col1 || ':',':') - 1) col1_val1,
                            substr(col1,instr(col1 || ':',':') + 1) col1_val2
                      from  t3
                   ),
             t6 as (
                    select  lvl,
                            substr(col2,1,instr(col2 || ':',':') - 1) col2_val1,
                            substr(col2,instr(col2 || ':',':') + 1) col2_val2
                      from  t4
                   )
    select  col1_val1,
            col1_val2,
            col2_val1,
            col2_val2,
            systimestamp
      from      t5
            full join
                t6
            on (
                t6.lvl = t5.lvl
               )
      order by coalesce(t5.lvl,t6.lvl)
    /
    
    COL1_VAL1  COL1_VAL2  COL2_VAL1  COL2_VAL2  SYSTIMESTAMP
    ---------- ---------- ---------- ---------- -------------------------------------
    123        456        abcd       fgrfr      23-OCT-12 11.50.12.015000 AM -04:00
    789                   rfrf                  23-OCT-12 11.50.12.015000 AM -04:00
    323        456        rfred                 23-OCT-12 11.50.12.015000 AM -04:00
    213                   tg         tg         23-OCT-12 11.50.12.015000 AM -04:00
    344                   tg         ophhh      23-OCT-12 11.50.12.015000 AM -04:00
    345        5454       op                    23-OCT-12 11.50.12.015000 AM -04:00
                          vdfgbh     poijn      23-OCT-12 11.50.12.015000 AM -04:00
    
    7 rows selected.
    
    SQL> 
    

    SY.

  • How can I use the SUM function to calculate the number of employees in the comp. &amp; deptnt?

    I have two tables: employees and their departments. I'm figuring the total employees by the Department and the total employees of the entire society. I know I have to use the SUM function, but I can only calculate total employees by Department and company separately. I need to get this result:

    DEPT_NAME     DEPT_TOTAL_SALARY         COMPANY_TOTAL_SALARY
    RESEARCH                  10875                        29025
    SALES                      9400                        29025    
    ACCOUNTING                 8750                        29025      
    
    
    This is my code:
    
    SELECT department_name, SUM(salary) as total_salary
    FROM employee, department
    WHERE employee.department_id = department.department_id
    GROUP BY department_name;
    
    SELECT SUM(salary)
    FROM employee;
    
    
    
    
    
    
    Can somebody help please?
    Thank you in advance.
    Published by: user13675672 on January 30, 2011 14:29

    Published by: user13675672 on January 30, 2011 14:31

    Hello

    Something like:

    SELECT dname,
           dept_tot_sal,
           SUM (dept_tot_sal) OVER () comp_tot_sal
    FROM   (SELECT   dname,
                     SUM (sal) dept_tot_sal
            FROM     dept, emp
            WHERE    dept.deptno = emp.deptno
            GROUP BY dname);
    

    There might be a smarter way, with no re - select.

    Concerning
    Peter

    Analytical functions:
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e17118/functions004.htm

  • count the number of lines without using the count function

    Hello
    How count the number of lines without using the count function?

    Thank you

    Assuming that your statistics table are updated:

    select num_rows
    from   all_tables
    where  table_name = 'YOUR_TABLE_NAME_IN_UPPERCASE';  
    

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14237/statviews_2105.htm#REFRN20286

  • How can I use the Ratio_to_report function in obiee

    Hello
    I have to use the ratio_to_report function to create the report.
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions124.htm.

    This is the link that explains the use of this function. This function calculates the ratio of a value to the sum of a set of values. How can I achieve this in BI


    Please help me

    Thank you
    Angelique

    Ensure that the measure is not shaved base measure, and it is the measure of level of detail...

    need more information about your data modeling, how tables are joined and how you aggregate them...

  • Problem in the export using the QUERY functionality

    Problem in the export using the QUERY functionality


    I'm trying to export some rows in a table using the query functionality
    and I have some errors... I'm using the syntax is

    system@orcl QUERY = scott.emp expdp: '"WHERE emp_no = 123455" '
    DIRECTORY = data_pump_dir DUMPFILE = data_pump.dmp
    LOGFILE = data_pump_12345.log INDEX = n

    Can someone tell me please the problem with that statement

    I also tried to use the simple export

    exp file system@orcl = orcl_export.dmp log = orcl_export.log
    tables = Scott.EMP index = QUERY = n------"WHERE emp_no\ = 123455\"

    and this error

    EXP-00008: ORACLE error 904
    ORA-00904: identify invalid

    My os is Solaris
    Please let me know what the problem

    Hello

    Try to create parfile and use that, otherwise, you will need to escape each clause correctly to run exp or expdp successfully.

    test.par

    tables=emp
    query="WHERE emp_no=123455"
    
    or
    tables=myobjects
    query="WHERE owner='SYS'"
    
    $> exp username/password parfile=test.par
    
    Export: Release 10.2.0.1.0 - Production on Thu Mar 19 10:17:48 2009
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining Scoring Engine options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    
    About to export specified tables via Conventional Path ...
    . . exporting table                      MYOBJECTS      22650 rows exported
    Export terminated successfully without warnings.
    

    Concerning

    Published by: OrionNet on March 19, 2009 10:21

  • By using the Concat function - in Excel Source

    Hello
    I use an Excel file in a table source and oracle as a target.

    In the Excel file, I need to concatenate two columns and map it to the column oracle target based on a condition.

    I used the concat function in editor Expression, but its throwing an error "Undefined event" as our source is not an oracle.

    What should I do to run the ODI excel function?

    Thanks in advance
    RAM Mohan T.

    Hi Ram,

    Run this function by selecting "transit Zone". I mean select column and say to run on the staging of option button.

    Thank you
    G

Maybe you are looking for

  • SIM card for phone I 5s?

    I have a used phone 5s without a Sim Card, the slopes of phone on Sprint apparently(Model A1453) using a Nano Sim. To activate it again insert sim, does not say what kind, but it just says: insert sim. Just buy a Sprint of Nano - Sim Card?

  • You can disable the automatically load a random number of Freecell game first starts?

    FreeCell startup in Windows 7, it automatically loads a game of chance.  I don't want it.  I ALWAYS want to choose the number of game I want to play.  Yes, I can choose the game - after - the cards are dealt, but then I have to accept defeat on the h

  • LAPN600 could ' t connect to the admin page

    Hello. The first time that I also tried to connect to the admin page it worked. But now when I try to connect if I'm lucky, I can log in, but after that I just got "page cannot be displayed". I HAV tried to reset the LAPN600 but it dosent resolves th

  • Cannot download Adobe digital reader get box asking to run as administrator

    I tried to download Adobe digital reader and when I try I get a race as a box with two options (1) saying run the current user who is not checked and 2) run as administrator is checked, I try to add my password and tells me it failed. I'm the admin u

  • Error reading file in Photo Editor

    I have a Kodak EasyShare C813. When I download the videos/photos to my computer, I go to the Start Menu, then pictures. I can see the thumbnails load, but when I click to see the images (majority around 1.1 MB), Microsoft Photo Editor (MPE) opens wit