Question of assignment to the value of the variable ODI

Hello

I have a value assigned question of one ODI variable to another

Scenario:

I have 2 variables var1 and var2 and you want to assign the value of var1 and var2. Assuming that var1 has a value of 11

I want in the end

var1 = var2 = 11

What do I do?

At the project level, stated 2 variables var1 and var2 alphanumeric two, without history

In the package

(1) I said as a refreshment var1 variable assigned a value via refreshing option

(2) declared a second SET variable var2

(3) assigned (tried various options) value with different options

# < Project code > .var1

"# < Project code > .var1.

"# < Project code > .var1.

< % = odiRef.getOption ("var1") % >

The value of VAR2 attaches not to the value of VAR1.

Hello

I am sure that I answered a question similar at least twice in recent months. Please do a search...

However do this changes

  • put your variable to the most RECENT VALUE
  • Rename them in capital LETTERS
  • Equip your package the following steps
    1. declare VAR1
    2. say VAR2
    3. Refresh VAR1
    4. Assign VAR2 with this #PROJECT value. VAR1

Let us know.

Tags: Business Intelligence

Similar Questions

  • ODI 11 g | Passing the value of the variable ODI option procedure

    Hi Experts,

    I need to pass the value of the global variable / project to an option of the procedure and in the application of the procedure to retrieve. Procedure will be implemented in jython.

    How can I pass the value of the variable option procedure ODI & then retrieve it in the jython script?

    Model data source is the flat file based & I want to retrieve the location of the source directory using jython/java (must implement an on file preprocessing step before calling the interface to load). Is there an ODI API to retrieve the location of the source directory?

    Thank you
    Ashish

    The reason OdiGetOption won't work because odigetoption running will search for the name of the variable where like everything using the execution variable will look at the value of the variable.
    In order to manage your situation i belive, we can establish by using the combination of getoption and global variable using the if condition

    You can write code something like that
    If odigetoption == 'dat ':
    ctrlfileExt = #v_CtrlFileExt
    If odigetoption == "txt":
    ctrlfileExt = #v_CtrlFileExtTxt

    This way, when you call the procedure, you can supply the value of the extension and procedure will use the right variable and the value.

    I hope this helps.

  • How to assign to the variable of type XML with function extract values?

    Hello

    I have variable XMLTYPE LeXml have under folder

    <? XML version = "1.0" encoding = "utf-8"? >
    < soap envelope: xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container = "http://www.w3.org/2001/XMLSchema" xmlns:soap = "http://schemas.xmlsoap.org/soap/envelope/" >
    < soap: Body >
    < AddListing xmlns = "http://www.christielites.com/" >
    string of < sComCode > < / sComCode >
    string of < sLocCode > < / sLocCode >
    dateTime < dStart > < / dStart >
    dateTime < made > < / made >
    < sEcode > string < / sEcode >
    < iAvail > int < / iAvail >
    < iOwned > int < / iOwned >
    string of < sPostTrans > < / sPostTrans >
    < / AddListing >
    < / soap: Body >
    < / envelope soap: >

    I want to get the sEcode value chain in a varialbe using the extract function or another?

    can someone give me the syntax FRO it?

    I tried with Mstring:=LeXml.extract('AddListing/scomcode/text()').getStringval(); but iam in error
    ERROR on line 1:
    ORA-31011: XML parsing failed
    ORA-19202: an error has occurred in the processing of XML
    LPX-00601: token not valid in: "soap:Envelope/text().
    ORA-06512: at "SYS." XMLTYPE", line 111
    ORA-06512: at the 'BLUEWATER '. CREATELERESPONSELOG', line 12
    ORA-06512: at line 1

    Please guide me.
    Mstring:=LeXml.extract('AddListing/scomcode/text()').getStringval(); 
    

    should be

    Mstring:=LeXml.extract('/soap:Envelope/soap:Body/AddListing/sComCode/text()', 'xmlns="http://www.christielites.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"').getStringval(); 
    

    I used to request verification is

    select xmltype('
    
    
    
    string
    string
    dateTime
    dateTime
    string
    int
    int
    string
    
    
    ').extract('/soap:Envelope/soap:Body/AddListing/sComCode/text()', 'xmlns="http://www.christielites.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"') from dual
    

    Ravi Kumar

  • maybe simple question of string of the variable in the pop up window

    Hello

    I write a name who helped me in the previous question, but now the list is great and sorry, no nicks personal

    Hi all

    We have a chain

    scany_col value {{15677, 5654, 7453}, {37008, 19532 17733}, {32896, 15163 14906}, {15934, 6939, 9509}, {16705, 6682, 9252}, {38293, 39064, 40092}, {19532, 6939, 8224}, {65535, 65535 65535}, {17219, 6425, 8738}, {24158, 9509, 11051}, {14392, 5911, 8481}, {22873, 16448, 16191}, {30840, 14649, 14649}, {29041, 16191, 15934}, {12593, 5397, 8224}}

    -(this is a RGB pixels)

    Choose from the list of the scany_col with the title "what color to the first position.

    the value of result listreturn

    listreturn

    ... one one-and this script returns an error "blah - blah with chain of cant.

    Tell me please, what is the problem?

    The sublists themselves aren't of strings and numbers.

    If you wish to choose from the sublists, replace the choice of the list command with:

    Choose from list (point 1 of scany_col) with the title "what color to the first position.

    If you want to choose a specific sub-list on all of them:

    scany_col value {{15677, 5654, 7453}, {37008, 19532 17733}, {32896, 15163 14906}, {15934, 6939, 9509}, {16705, 6682, 9252}, {38293, 39064, 40092}, {19532, 6939, 8224}, {65535, 65535 65535}, {17219, 6425, 8738}, {24158, 9509, 11051}, {14392, 5911, 8481}, {22873, 16448, 16191}, {30840, 14649, 14649}, {29041, 16191, 15934}, {12593, 5397, 8224}}

    Set scany_strings to {}

    Repeat with this_item in scany_col

    the value scany_strings scany_strings & ((article 1 de la this_item as string) & "," & (article 2 of the this_item as string) & "," & (point 3 of this_item as string))

    end repeat

    Choose from the list of scany_strings with the title "what color to the first position.

    listreturn Set result

    listreturn

    (143331)

  • Assign a value to a variable ODI or Java in a KM

    Hi gurus,


    I develop a new km and I need to get the name of a dblink calling an Oracle function. How to store the result of a function in an ODI or Java variable in a KM stage?
    And if it's in a Java variable, how to use it in this kind of step (line 7):

    create or replace view < %=odiRef.getObjectNameDefaultPSchema ("L", "", "W") % > < % = odiRef.getInfo ("COLL_NAME") % >
    (
    < % = odiRef.getColList ("", "[CX_COL_NAME]", "\n\tclick", "", "") % >
    )
    in select < % = odiRef.getPop("DISTINCT_ROWS") % >
    < % = odiRef.getColList ("", "[PHRASE]", "\n\tclick", "", "") % >
    from < % = odiRef.getSrcTablesList ("", "[SCHEMA].) [RES_NAME]@"+++*#PROJECT. VARIABLE * +++ "[POP_TAB_ALIAS]", ",", "") % >
    where (1 = 1)
    < % = odiRef.getFilter () % >
    < % = odiRef.getJrnFilter () % >
    < % = odiRef.getJoin () % >
    < % = odiRef.getGrpBy () % >
    < % = odiRef.getHaving () % >


    Thanks a lot for your help.


    Best regards

    Insted of jython, if you're going to take java beanshell, it would be great.

    Source technology: Oracle (also select the logic diagram where the sql query runs)
    The target technology: Java BeanShell

    put the codes below in the target tab Source tab will be empty.

    <>
    import java.sql. *;

    String val ="";
    String sqlquery = "select sal from emp;
    Connection conn = odiRef.getJDBCConnection ("SRC");
    Statement st = conn.createStatement ();
    Res ResultSet = st.executeQuery (sqlquery);
    While (res.next ()) {}
    Val = res.getString (1);
    }
    Conn.Close ();
    @>

    Just substitute your query.
    SQLQuery = "SELECT DBLINKNAME (< %="odiRef.getOption("SRC")%"><%=getContext("CTX_NAME")%>) FROM DUAL"; "

    Now you can use this variable of java (val) in your procedure.
    Thank you.

  • Required emergency aid: restore the value assigned to the previous session variable

    Restore the variable value assigned to the previous session.

    I'm looking to restore the value assigned to a variable in the previous session. I learned that I don't put any value in the field of the value of the variables, captivate will automatically restore the value assigned to the variable in the previous session. Captivate stores interrupt the data value.

    Also, I could find a good example with source and the file published by Jim Leichliter. However, if it is downloaded the file published to Moodle, it works fine. But if it is open the file source Captivate 5 publish without making any changes and transfer to Moodle. It does not work.

    Any thoughts or ideas are appreciated.

    This should work for both.

  • How we use the variable checkbox?

    I use Cap 8. Finally, I want to set a variable to store the user's decision to play any narration automatically, or do not play automatically narration.

    A check box appears as a perfect way to let the user make this decision, so I used the box widget to display only a single checkbox. Successfully, I set the text property of checkbox and entered a unique variable name (myNarrationDefault) to store the State of the checkbox. Now how to access the variable?

    I added a text field, so I could see the value of this variable. However, when I try to insert a variable, I don't see the new user variable, in the list. Then I tried to add an action to a button just to see if the variable appears in the tool; There can be no.

    I'm doing something wrong?

    Thank you

    Pete

    In fact, you will need to create so that the variable you made in the interaction interface, CP does not do it for you, project/Variables in the top Menu.

    When the box is checked, the value is then assigned to the variable.

  • Apply the variable definition in the subclass with abstract method

    Hello

    It's his practice use? :
    public abstract class Base {
        private int importantPrivateVariable = setImportantPrivateVariable();
        protected abstract int setImportantPrivateVariable();
    }
    I want to apply the extension of the class to define a private variable, but there is no variable abstract in java, I can use a method for that.

    Thank you
    lemonboston

    Edit: the variable can be protected as well, I guess that's not important here, but correct me if I'm wrong

    lemonboston wrote:
    Hello

    It's his practice use? :

    I don't think it's so common, but it's easily understandable code. However, there are several problems with this approach:

    public abstract class Base {
    private int importantPrivateVariable = setImportantPrivateVariable();
    protected abstract int setImportantPrivateVariable();
    }
    

    I want to apply the extension of the class to define a private variable

    This is some what your code implements: your base class requires the subclasses to return an int value, and the Base class uses this value to assign to the variable.

    Therefore, the method should be called to (for example getInitialValueOfImportantVariable()+ to have a consistent naming with his signature (it returns a value, whereas a regular setter must declare a void return type: protected abstract void setImportantPrivateVariable (int someValue);).)

    Edit: the variable can be protected as well, I guess that's not important here.

    Well, Yes, it is 'important' - at least, there is a noticeable difference: the variable is private, the base class is free to treat it as seems it (for example, assign the value at construction time and never change it later). If the variable was protected, the subclass could change in ways and at times not known by the base class.

    but correct me if I'm wrong

    There is a trap in this construction: the method is called in the variable initializer, i.e., behind the scenes, about during execution of the Base, so before the constructor of the sub-class class constructor. For example, you call a method on an object that is not completely initialized (for example some of its attributes may always be null at this point). There is a rule that discourages this kind of situation, which goes something like "no calling private and unofficial constructor methods.

    To avoid this trap, two options:
    -requires an int argument in the constructor of the Base class, as suggested above
    -Don't be and set the value of the important variable in the code of the initializer or the constructor, but a special method in the base class instead:

    public abstract class Base {
        private int importantPrivateVariable; // default value is zero
    // or alternatively:
    //    private int importantPrivateVariable = ...; // Some default value
        protected abstract int getImportantPrivateVariable();
    
        public void initializeImportantPrivateVariable() {
            importantPrivateVariable = getImportantPrivateVariable();
        }
    }
    

    This construction is a degenerate form of a common model known as the model method (where a base class method calls usually several methods of the subclass in a specified order and with a specified sequence, allowing for the subclass to implement the details of the methods).

    The downside is that the client code (the one that uses the Base instance) must know when to call this initialization method, while initialization, a constructor-based allows the free client code of don't like do not at all.

    Much luck,

    J.

  • Error 'Missing IN or OUT parameter to the index' ODI

    Hello

    Im trying to load the data of several Oracle DB data sets for Oracle table and I get the following error:


    "ODI-1228: CAPEX (Export) has failed on the target of ORACLE DEV connection transit area."

    Caused by: java.sql.SQLException: parameter IN or OUT to missing index: 3 "

    This error pops up when loading the data from each data set temporary tables (C$ _0CAPEX...) C$ _4CAPEX) in a general temporary table (C$ _CAPEX). The LKM that im using is SQL to SQL

    Capture.PNGCapture2.JPG

    I think the problem might be related to "target_code" generated by the ODI on this step,

    Insert into C$ _CAPEX

    (

    CUENTA, PERIODO, ANIO, STAGE, F_SOLICITANTE, PROYECTO0, VERSION, AFC, DATA

    )

    values

    (

    : ACCOUNT,: PERIODO, : SP2F. Anio,: STAGE,: F_SOLICITANTE,: PROYECTO0,: VERSION: AFC,: DATA

    )

    Please provide us with your valuable answers.

    Concerning

    Thank you KK and Tina Wang for your answers,

    I found that one of the variables ODI (SP2F. Anio) I was using on a filter had the same name of a (Anio) column of the target table. In view of the comment KK, I tried to pass this filter to the staging, but the problem persisted.

    Just in case anyone has the same problem that I changed the name of the ODI "Anio" variable to another name and now the flow runs without error.

    Concerning

  • How to assign the value of a variable to a quiz?

    Hi, I have a problem, I attempted to set the value of a variable for the quiz on the final value of the project, any suggestions?

    Sorry but I do not understand your question at all. If you talk about a quiz like cpQuizInfoPointsscored or cpInfoPercentage system variable, this is all simply impossible because the system variables are read-only.

  • How do I know what value to assign to the EMDROOT variable?

    How do I know what value to assign to the EMDROOT variable?

    Hello

    To know what value you must set the EMDROOT environment variable, you must run:

    getemhome emctl $

    Of the command that precedes the exit, EMHOME = $ORACLE_HOME
    Then set the environment variable EMDROOT with value recovered to EMHOME.

    Thank you
    Vincent

  • Assign the textfield value to a variable

    How can I transfer a textfield value in the variable?

    [CODE]

    import flash.text. *;

    import flash.events. *;

    import flash.display. *;

    Button named Player_save

    Player_save.addEventListener (MouseEvent.CLICK, savename);

    function savename(event:MouseEvent):void

    {

    playerlist. Text = Player_name. Text;

    trace (Player_name. (Text);

    Player_name. Text is the TextField

    }

    [/ CODE]

    First declare the variable, then assign the text value of the textfield object.

    var playerName:String = player_name.text;

  • Assign the numeric value of Substitution Variable?

    What I try to do is:

    Read a CSV file via the unix shell and choose some columns in each row
    Transmit the data to a MaxL Script
    Assign the data passed to substitute variables in the MaxL script.

    Problem:

    Two of the columns contain digital data (for example: 0.5 or 60 etc..) I want to set the substitution variables in these digital data (without the quotes). I tried to use

    Edit the < app and cube name > database variable 'Variable' $1;

    but it gives me error
    ERROR - syntax error 1242021-1 ['. 5']
    I tried with quotes single and double, but they value the value of the variable $1

    If I manually set the value of this Variable through the Regional service to 0.5, everything works perfectly. Any ideas on how to do this? the Ser60 does not provide a solution.

    An example is

    startMaxl scriptname.mxl "0.5"

    alter database appname.dbname set variable "VariableName" $1;

    or

    startMaxl scriptname.mxl 0.5

    alter database appname.dbname set variable "VariableName" ' \'$1\' ";

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to assign the value to the variable of project in the Jython script

    Hello

    I want to assign a value to the variable of project in the jython script.
    I tried to assign the following, but it is throwing some errors.

    < @.
    int noOfRecords = 10;
    #var1 = noOfRecords;
    @ >


    Can you please help me in this regard.

    Concerning
    Shyam

    Perfect! Good to know that!

    Please, don't forget to close the thread and assign the status to 'correct' or 'comfortable' to each response that helped you!

    Thank you

    Cezar Santos
    http://odiexeperts.com

  • Access the value of a variable assigned to CompositionReady?

    I created a variable called counter inside the 'scene' in the "CompositionReady" using the following code.

    var counter = 0;

    How to get or write the value of this variable

    through a 'trigger '?

    Remove the var on the counter.

    Just so put this in compositionReady

    counter = 0;

    Then you can just call him in a trigger as

    Alert (Counter);

    or

    counter + 1;

    or as if (counter == 1) {}

    }

    or whatever.

    I hope this helps.

Maybe you are looking for