1
votes

I am using a stored procedure as a source in my Informatica mapping, and I have defined the SQL query in the source qualifier as

exec dbo.GET_ATTRIBUTES($$fromDate, $$toDate)

where $$fromDate and $$toDate are mapping parameters I have defined in a parameter file. I have tried a number of different ways of going about this and none seem to work, as the SQL query fails to validate.

So, my question boils down to this, is there a way to call a stored procedure while passing in two mapping parameters?

Thanks in advance

2
Post this comment as an answer and mark it as accepted. It will be easier for others to find and you'll get reputation for this. - Marek Grzenkowicz

2 Answers

4
votes

I actually figured out what my issue was. It turns out that when I defined the mapping parameters I had set the IsExprVar field to TRUE. When I set it to FALSE I was able to pass the parameters to the stored procedure when calling it in the SQL query field of the source qualifier.

0
votes

I have had exact opposite problem.

When executing t-sql stored procedure from mapping, that accepts time in hh:mi:ss, using parameter that is set with IsExprVar to FALSE, have been failing with error "[Informatica][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Conversion failed when converting date and/or time from character string.]"

After changing the same parameter to IsExprVar to TRUE, executing t-sql stored procedure from mapping finished successfully.