Forum Stats

  • 3,837,097 Users
  • 2,262,225 Discussions
  • 7,900,202 Comments

Discussions

Variable has no value when executing a scenario

385859
385859 Member Posts: 15
edited Mar 16, 2009 11:50PM in Data Integrator
Hi,

I have a simple package consists of two steps:
1. Refresh a variable "V_FILENAME_D501" to get the value inputted from user. The refreshing statement is "select '#V_FILENAME_D501' and it is running in a SQLServer environment.
2. Execute an interface which loading data from a file (filename from step 1) into an essbase database.

The execution failed at step 1 with the following error message:
java.lang.Exception: Variable has no value: CBS_PRD_PROJECT.V_FILENAME_D501

at com.sunopsis.dwg.dbobj.SnpVarSess.getValue(SnpVarSess.java)

at com.sunopsis.dwg.dbobj.SnpSessTaskSql.bindSessVar(SnpSessTaskSql.java)

at com.sunopsis.dwg.dbobj.SnpSessTaskSql.bindSessVar(SnpSessTaskSql.java)

at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskPreTrt(SnpSessTaskSql.java)

at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)

at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.treatTask(SnpSessTaskSqlV.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.h.y(h.java)

at com.sunopsis.dwg.cmd.e.run(e.java)

at java.lang.Thread.run(Unknown Source)


Any Idea what happens?

regards,
James.

Answers

  • Guru Sankar
    Guru Sankar Member Posts: 1,165
    edited Mar 16, 2009 5:30AM
    Hi James,

    How are you?

    You can't query a file data store so it will error out. You need to build a small logic for that. Please follow the below steps to implement that.

    1. In your source data store just give the resource name as #CBS_PRD_PROJECT.V_FILENAME_D501

    2. Drag and drop that data store as your source in the interface.

    3. Make your variable V_FILENAME_D501 data type as Alphanumeric, Action as Not Persistent.

    4. Drag and drop the twice variable in your package make that as a Declare variable and in the second step make that as Refresh Variable then in the third step your interface.

    5. Generate a scenario out of that and while executing that scenario give the Value as your desired file name, hit enter once you gave, otherwise it wont take the input and make sure that LAST VALUE is UNCHECKED.


    PS: You can still do it without Default Value as *<%=odiRef.getSrcTablesList("", "[SCHEMA]/[RES_NAME]", "", "")%>* :)

    Thanks,
    G


    Edited by: Gurusank on Mar 16, 2009 2:58 PM
    Guru Sankar
  • 385859
    385859 Member Posts: 15
    Guru, it's solved.
    thanks,
    James.
This discussion has been closed.