question

ewinkiser avatar image
0 Votes"
ewinkiser asked ·

Please help...an ADF Bug in Final Testing - Making a Query in a Lookup Activity with a Variable Failing

Hello!
@nasreen-akter @HimanshuSinha-MSFT @MartinJaffer-MSFT

We have a bug in Final Testing. I am trying to make the following Query in a LookUp Activity:

SELECT ShortName, EEOXrefCode FROM [MercerStagingDev].[MILKY-WAYTEST\AppSQLVST4DotNetDev-R].[Copy of Battelle Work Assignment Fields Jobs]
WHERE XRefCode = @variables('JobXRefCode')

I have the Set Variable showing the correct String 'JobXrefCode' but am getting a crazy error. Please help; I must figure out how to do this "syntax" this weekend.
Thanks!!
Mike Kiser

Error code
2100
Troubleshooting guide
Failure type
User configuration issue
Details
Failure happened on 'Source' side. ErrorCode=SqlOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed with the following error: 'Must declare the scalar variable "@variables".',Source=,''Type=System.Data.SqlClient.SqlException,Message=Must declare the scalar variable "@variables".,Source=.Net SqlClient Data Provider,SqlErrorNumber=137,Class=15,ErrorCode=-2146232060,State=2,Errors=[{Class=15,Number=137,State=2,Message=Must declare the scalar variable "@variables".,},],'

azure-data-factory
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

nasreen-akter avatar image
0 Votes"
nasreen-akter answered ·

Hi @ewinkiser,

Please try

@{variables('JobXRefCode')}
or for string
'@{variables('JobXRefCode')}'

Thanks! :)

· 4 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @nasreen-akter !! Thanks SO SO much! You were correct as always :-)

The string expression you listed above worked great!! Thank you for the quick reply! I am under the gun this weekend since our Product is to go live soon, but first of course I have to fix the bugs :-)

Thanks!
Mike

1 Vote 1 ·

Best of luck @ewinkiser. Hope everything will go well! :)

1 Vote 1 ·

@nasreen-akter , thanks. I'm just curious since I am trying to learn as I go. How will I know when to use braces like in your solution above? Is there a general rule?

Thanks again! Starting another day of bug fixing :-)

Mike Kiser

0 Votes 0 ·
Show more comments