\Critical Use of variables in ODI

Hi,
I have a problem in which i have to use a filename which is dyanamic. so if my job is following:
variable(containing dynamic name)--->interface
everything runs fine
but if
variable(containing dynamic name)--->scenario of interface
it doesnt works
seems odi does not resolve variables in scenario
Please suggest is it possible or not as i need to put a scenario and not the interface.

I have put the value of the variable which i want to use in the input of scenario in the additional variables tab of scenario
Project Variable Value
General Filename #General.Filename
General Filename
I m getting this error:
va.lang.Exception: Specified variable not found in the Repository : GENERAL.Filename
     at com.sunopsis.dwg.dbobj.SnpSession.updateVarWithSessVar(SnpSession.java:2905)
     at com.sunopsis.dwg.dbobj.SnpSession.treatSessVariables(SnpSession.java:2466)
     at com.sunopsis.dwg.dbobj.SnpSession.treatSessionPreTrt(SnpSession.java:2433)
     at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1855)
also current command is
OdiStartScen "-SCEN_NAME=DYNAMICFILE" "-SCEN_VERSION=001" "-GENERAL.Filename=#General.Filename"
I want to use variable from project general named as filename as an input to the scenario
Please suggest me the correct way to do it.

Similar Messages

  • Using variables in ODI 11.1.1.5

    Hi,
    i have created 4 variables in ODI 11g as mentioned below:
    1.Variable_name = v_date
    datatype = alphanumeric
    default value = '30-NOV-2011 11:00:00'
    2.Variable_name = v_time_offset
    datatype = alphanumeric
    default value = 125
    3.Variable_name = v_starttime
    datatype = alphanumeric
    default value = '30-NOV-2011 11:00:00'
    4.Variable_name = v_endtime
    datatype = alphanumeric
    default value = '30-NOV-2011 11:30:00'
    I have created a filter on the source table to pull the records only for the time between v_starttime and v_endtime.
    Now, in the ODI package, I have declared all the above 4 variables. Here I want to calculate the variable values v_starttime and v_endtime to pass on to the interface. I have used the below calculations to set the variables :
    v_starttime = #v_date+(#v_time_offset/1440)
    v_endtime = #v_date+((#v_time_offset+5)/1440)
    Now when I execute the package, the package(the interface) is getting failed with the error - invalid character. When I looked into the variables to see whether they are refreshed properly, they didn't. In the Operators, Under 'History' of variables section, the value of both the variables are showing as #v_date+(#v_time_offset/1440) and #v_date+((#v_time_offset+5)/1440) only. Thats means the varaibles are not evaluated properly. Kindly help me how can I fix this ? Many thanks in advance ...
    regards,
    sai

    Hi Sai,
    Please try below one
    Take 2 more ODI variable 1) v_STime and 2) v_ETime
    In v_STime write below query
    select to_date(to_char(v_date,'yyyy-mm-dd'),'yyyy-mm-dd')+(to_number(#v_time_offset)/1440) from dual;
    In v_ETime write below query
    select to_date(to_char(v_date,'yyyy-mm-dd'),'yyyy-mm-dd')+(to_number(#v_time_offset)+5/1440) from dual;
    Note: For v_date,v_starttime and v_endtime variable please don't take default value just write below query
    Query: select sysdate from dual;
    Hope this may helps you
    Regards,
    Phanikanth

  • Help : How to use list of values in Variable in ODI

    Dear All,
    I have a multiple values in table, and I would to use these values a a parameter in ODI to retrieve rows based on these values. As I know that we can use single value in variable in ODI.
    Any one can Help me please?

    Can't you use a join between the tables ?
    ODI mostly take advantage of native technologies.
    i.e If my source technology is oracle then i will create a join between the table i.e. MAINTABLE.column = LOVTABLE.COLUMN and also put a filter on LOVTABLE to take required values.
    OR you can write a subquery in the Filter i.e. MAINTABLE.COLUMN in ( Select LOVVALUES from LOVTABLE where LOVTABLE.ATTRIBUTE = 'BUSINESS_UNIT')

  • Can ODI use environment variables?

    Running on Linux/Unix, can ODI use environment variables? For example, export LANGUAGE="en", and anyway in ODI can get variable LANGUAGE?

    It is easy.
    Use the following command at variable Refresh tab and let the Logical Schema to the file too...
    Just change the file path (c:/temp/cezar_test.txt)
    Select COLUMN_1 from TEST
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=TESTSNP$CRLOAD_FILE=c:/temp/cezar_test.txtSNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=3BSNP$CRFILE_SEP_LINE=0D0ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=COLUMN_1SNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CR$$SNPS_END_KEY*/
    For this command the file must to have just just the value in one line.
    Does it help you?
    Edited by: Cezar Santos on 23/01/2009 16:14

  • Difference Between 2 dates using variables in ODI

    Hi,
    I have 3 variables in ODI,
    Start Date, End Date and Duration.
    Start Date - Alphanumeric -  select TO_CHAR(SYSDATE,'DD-MM-YYYY HH24:MI:SS') FROM DUAL
    End Date - Alphanumeriic - select TO_CHAR(SYSDATE,'DD-MM-YYYY HH24:MI:SS') FROM DUAL
    Duration - Alphanumeric - select to_date(#Start_date, 'DD-MM-YYYY HH24:MI:SS') - to_date(#END_date, 'DD-MM-YYYY HH24:MI:SS') FROM DUAL
    It says invalid character.
    Please let me know how can I find the difference of the start date and end date as duration

    Have you tried
    select to_date('#Start_date', 'DD-MM-YYYY HH24:MI:SS') - to_date('#END_date', 'DD-MM-YYYY HH24:MI:SS') FROM DUAL
    Cheers
    John

  • Using a variable in refreshing tab

    Hi all,
    i want to use the following query in the refreshing tab of a variable
    select count(*) from Scott.abc where scott.abc.filename=#filename
    where #filename is a declare variable that contains the name of a file(text) .
    But when i execute this variable, it is giving invalid sql format.
    So can i use a variable in the refreshing tab of a variable??? if so.. how??
    Or if not then how do i compare the value of a column of a database table with the value stored in an odi variable.
    Kindly help.
    Thanks in advance.

    Easy method to debug such issue is to copy your SQL [ select count(*) from Scott.abc where scott.abc.filename=#filename ] into any SQL Editor.
    Secondly copy the value of the #filename from the History tab of the variable from the Operator and substitute in the above query and run that should give you a more clear idea .
    It would not only help in this issue too but other issues when you are fetching values from variable or query .
    hope this helps.

  • Using a variable inside another variable

    I'm trying to use one two variable in a package with one variable feeding its value to another variable as follows:
    Variable 1 = Count
    Variable 2 = File_Name
    Variable 1 counts up from 1;I would like to use this value as an input to Variable 2 as follows:
    SELECT LOAD_FILENAME FROM DIMSTATS_FILENAME WHERE (SELECT ROW_NUMBER() OVER (Order by FILE_ID) AS RN FROM DIMSTATS_FILENAME) = #DIMSTATS_TEST.count.
    How ever I am getting the following Error :
    +ODI-1228: Task File_Name (Variable) fails on the target  connection DDBSTAGE.
    Caused By: java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver][SQLServer]The multi-part identifier "#DIMSTATS_TEST.count" could not be bound.+
    I have also noticed that the value of Variable 1 is not being passed to the Select statement above through SQLServer Profiler. If I hard-code the value of #DIMSTATS_TEST.count (Variable1) the query is successful.
    How can I get the value of Variable 1 to be passed to Variable 2?
    Could someone please help
    Thanks

    You did not mentioned how you are using those variable .
    You need to have these variable inside a package .
    It will be like
    Variable 1 (Refresh) -------OK-------->Variable 2(Refresh) ------------OK-----> Some other operation .
    Thanks,
    Sutirtha

  • Using environment variable / double quotes in "Arguments" in "Server Start"

    I have an admin server, NodeManager, and 1 managed server, all on the same machine (windows). I am trying to enter something similar to this to the arguments field in the Server Start tab:
    -Dmy.property=%USERPROFILE%\someDir\someJar.jar
    But when the managed server is started it throws this exception:
    Error opening zip file or JAR manifest missing : %USERPROFILE%\someDir\someJar.jar
    It appears that the environment variable is not being translated into it's value. It is just passed on to the managed server as plain-text. I tried surrounding the path with double quotes (") but the console validates the input and does not allow this: *"Arguments may not contain '"'"*
    Even editing the config.xml file manually cannot work, as the admin server fails to startup after this:
    <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: [Management:141266]Parsing failure in config.xml: java.lang
    .IllegalArgumentException: Arguments may not contain '"'.>
    I also tried using %20 to no avail, it is just passed as %20.
    I thought that perhaps this had something to do with the spaces in the value of %USERPROFILE% (which is "C:\documents and settings.."), but the same thing happens with other env. variables which point to other directories with no spaces.
    _My question:_
    Is there any supported way of :
    using double quotes? what if i have to reference a folder with spaces in it's name?
    reference an environment variable? What if i have to rely on it's value for distributed servers where i do not know in advance the variable's value?
    Edited by: 937622 on Sep 28, 2012 1:02 AM

    There is workaround : http://stackoverflow.com/questions/12629395/weblogic-using-environment-variable-double-quotes-in-arguments-in-server
    Just posting here for reference. Let's see if we get a different answer from anyone else.

  • Variables at ODI 11.1.1.7 must be uppercase?

    Hi guys,
    Recently, I have upgrade ODI from 10g to 11.1.1.7 at the upgrade guide I saw that variables in ODI 11.1.1.5 must be in uppercase if they are not in this format I can use "".
    This apply to ODI 11.1.1.7?

    I believe it applies. Why dont you just test this in ODI 11.7?

  • Is it possible to read Essbase Substitution variables from ODI?

    Is it possible to read Essbase Substitution variables from ODI?

    Hi,
    You can do it with custom code, if you have a read of a blog I wrote :- http://john-goodwin.blogspot.com/2009/11/odi-series-planning-11113-enhancements.html
    About half way through I go into reading essbase sub vars using the essbase java API.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Changing substitution variables through ODI

    Hi John!
    We using ODI for loading data, before load we have to clear data.
    I have 2 questions regarding this issue:
    1. Can I change substitution variables through ODI
    2. Can I execute BR in Essbase.cmd
    Regards
    Sasha

    Hi,
    1. You can call maxl to update the substitution variables, either using the pre-maxl options in the KMs
    or you can execute an OS command through an ODI procedure
    2. I am not sure what you are asking, are you asking whether you can execute BRs through ODI, if so have a read of my last blog where I covered how to do it.
    You can execute BRs by using the command line launcher, have a read of the blog anyway because it goes through the command line launcher.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Using a variable in communication channel

    Hi,
    I have a lot of Communication Channels looking for files in the same directory. This directory's path will be changed soon and so I assume I'll have to change all my Communication Channels.
    I was wondering whether there was a means of using a variable for the Source Directory in order to just have to change its value where it is defined and not every where it is used...
    Regards
    Yann

    Hi,
    Is this a sender file adapter? or a receiver file adapter?
    You can make a change / make the receiver file adapter's directory dynamic by setting the value during runtime in the mapping.
    Use  this blog and the code in the blog to acheive this,
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Sender File adapter, I dont think this is possible.
    Regards,
    Bhavesh

  • Error in using System Variable

    Dear all,
             I want to use System Variable 225 ( VAT percent (per VAT code) ) which is used in one of document i.e. "VAT Only Invoice".
    When I used it in my Invoice document the following error occurs:
    Printing Error : Invalid Variable number (RPT -6300)(Field:F_XXX) Variable 'XXX'
    Please help me to use this System Variable in my Invoice.
    Note: I have already read "How To Use the PLD Variables File in Release 2007 A" .pdf file.
    can any one tell the meaning of folowing which is in the sheet "vars utilisation" of PLD_Vars_march2007 xls file
    " it means that this variable can be used only under certain repetitive area exclusive numbers (109, 126, 132, 135, 139, 148, 149, 309, 316, 427, 502, 509, 686)
    Regards,
    Ghazanfar
    Edited by: Ghazanfar Ahmed on Jun 18, 2009 12:16 PM

    Hi,
    It is a special variable available for the VAT summary part, not to be used in the rows but in a separate repetitive area.
    To display the respective VAT rates in each row, create a database field instead: Tax Definition - Rate%. It will populate the VAT percentage for you.
    Regards,
    Nat

  • Error in using a variable in filter condition in an Interface

    Hi All,
    I am using a variable in my interface in a filter condition. I have an EMP table of scott schema and want to pull all the records wiht hiredate date lying between 2 dates, incremental pull.For this I have created 2 variables and using them in the filter condition. I am getting an error inthe interface when I run in a package after declaring and refresing the variables.
    com.sunopsis.sql.SnpsMissingParametersException: Missing parameter
         at com.sunopsis.sql.SnpsQuery.completeHostVariable(SnpsQuery.java)
         at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Regards,
    Krishna

    Hi Krishna,
    What is the datatype of the Variable lastupdate ?
    In my case
    Variable
    Name : LastUpdateDate
    Datatype : Alphanumeric
    Action : Historize
    Query : select to_char(to_date(sysdate,'DD-MON-YY'),'DD-MON-YY') from sys.dual
    Then in filter I used
    EMP.HIREDATE>to_date('#LastUpdateDate','DD-MON-YY')
    Thanks
    Sutirtha

  • Using a variable as a value in jsp:param

    I was wondering, I have a String variable, vid_1, and want to use a jsp:include and pass that in as one of the parameters. How can I do this? I have to do some testing to make sure vid_1 is valid and set a default if not. It contains a number referring to which video needs to be displayed.
    Is there anyway I can get this value to be used in jsp:param value?
    John

    RahulSharna wrote:
    Well,First thing you haven't pharsed your question properly.
    Anyways as per my understading.
    The first thing is make use of in this case as your defined requirement states you need to make use of variables of both the JSP's which need compile time include not at the runtime.use of
    <%@ include file="url" %>would be more appropriate as you want to use the variable of parent jsp to the child one.
    Anyways if you are thinking to apply a solution using <jsp:include/>
    <jsp:include page="url">
    <jsp:param name="paramName" value="<%=stringVariable>"/>
    </jsp:include>and extract the paramName's corresponding value as a request parameter in other JSP.
    Hope that might answer your question :)
    REGARDS,
    RaHuLRaHul,
    Thanks for the reply. The second example you gave is what I was trying to do. I thought I did exactly what you have there and it was not working. I will check it over again and post back on here when I have a chance.
    For now I was trying to use c:set to save the variable in the request and then using the EL expression ${requestScope.variable} to put it in the <jsp:param> element. I had some things working and others not when I quit. Hopefully tomorrow I can give you a full report and we can get this worked out.
    Maybe my problem is something else? Look at this post of mine:
    http://forum.java.sun.com/thread.jspa?threadID=5236252&tstart=10
    Thanks so much for the help.
    John

Maybe you are looking for

  • Swatch Files in Bridge CS5

    I recently upgraded to Creative Suite CS5 (on Windows XP).  Previously I had Illustrator CS3 & Photoshop CS3 and used Bridge to manage/view my swatches (both in AI & ASE).  Now that I have "upgraded" I can't seem to view the ASE files in Bridge CS5 a

  • Removing repeated lines when scrolling?

    Recently Safari (v. 5.1) has changed its scrolling behavior on my MacBook Pro (OS 10.6.8).  In the past when I used the scroll bar to move up or down it advanced exactly one page, but recently it has started repeating two or three lines of text.  Thi

  • Prevent Portal Application from starting

    Hello. We are having problems starting up a portal. Everytime we try to start it we have a java deadlock, and we wonder whether it is possible to prevent an application from starting. Specifically the application we would like not to start is: sap.co

  • What code can i use to add an image to a JPanel?

    I tried multiple image tutorials and none of those supplied me with a way to add an image to a JPanel without using hidious code. Don't anyone know simpler code which i can use?

  • Using multiple sets of speakers in stereo configuration (for movies)

    I have hit a wall while trying to configure my stereo setup in my apartment. i'm trying to always take my stereo/audio setup to the full capabilities all the time, and i'm one small caveat away from making this idea work.  hopefully someone can help