Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Using tContextLoad and tFixedFlowInput for Input Parameters to MSSqlSP

I have a Stored Procedure with three Input Parameters. I would like to supply values for these three parameters via tContextLoad, but I don't understand how to set the properties of the tFixedFlowInput component or the MSSqlSP component.
In the tFixedFlowInput component:
Currently I have 'Number of Rows' set to 1, the 'Use Inline Content(delimited file) option selected and in the 'Content' box I have this:
context.intLogTypeId;context.strObjectID;context.strObjectName
The schema for this component contains 3 rows, one for each of the data items shown in the 'Content' box and in the same order.
In the MSSqlSP component:
3 columns defined:
intLogTypeId IN
strObjectId IN
strObjectName IN
The job context file contains this:
intLogTypeId;1
strObjectID;objXID
strObjectName;PenXObj2
When I run the job, I get this error (it looks like it's passing a value of "context.intLogTypeId" rather than the value contained within this jobcontext item)
Starting job Proof2 at 16:40 20/08/2013.
connecting to socket on port 4010
connected
Exception in component tFixedFlowInput_1
java.lang.NumberFormatException: For input string: "context.intLogTypeId"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at routines.system.ParserUtils.parseTo_int(ParserUtils.java:87)
at routines.system.ParserUtils.parseTo_Integer(ParserUtils.java:94)
at healthdwforiqm.proof2_0_1.Proof2.tFixedFlowInput_1Process(Proof2.java:1841)
at healthdwforiqm.proof2_0_1.Proof2.tMSSqlRow_1Process(Proof2.java:1549)
at healthdwforiqm.proof2_0_1.Proof2.tMSSqlConnection_4Process(Proof2.java:1444)
at healthdwforiqm.proof2_0_1.Proof2.tMSSqlConnection_1Process(Proof2.java:1329)
at healthdwforiqm.proof2_0_1.Proof2.tFileInputDelimited_3Process(Proof2.java:1214)
at healthdwforiqm.proof2_0_1.Proof2$1.run(Proof2.java:4144)
disconnected
Job Proof2 ended at 16:40 20/08/2013.
Labels (3)
3 Replies
Anonymous
Not applicable

I would say that you've either defined your context parameter as a string rather than a number, of you've double-quoted it when referring to it.
alevy
Specialist
Specialist

You can't use context variables in the Inline Content(delimited file) option as the contents of that box are treated as if they were being read from a delimited file (funnily enough) i.e. it's trying to put the words "context.intLogTypeId" into the first column of your schema. Use the Single Table option instead.
_AnonymousUser
Specialist III
Specialist III
Author

Thank you, finally managed to get this working using 'Single Table' as suggested 🙂