question

ewinkiser avatar image
0 Votes"
ewinkiser asked HimanshuSinha-MSFT commented

Using @greater() - Please help...QA Testing failure item

Hello! @nasreen-akter

I am trying to use the following to drop into an IfElse Activity but am getting an error:

@greater(item().virtualWorkPercentage, 0)

item().virtualWorkPercentage is a string
ADF sees 0 as an int

the error is:
The function 'greater' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Integer' that do not match
Source

Thanks!
Mike Kiser

azure-data-factory
5 |1600 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.

HimanshuSinha-MSFT avatar image
0 Votes"
HimanshuSinha-MSFT answered HimanshuSinha-MSFT commented

Thanks @nasreen-akter for the help
Hello @ewinkiser ,

Issue 1 :
The function 'greater' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Integer' that do not match
i was able to repor this by and what @nasreen-akter suggested should resolve the error .

 @greater(int(item()),0)

Issue 2 .
The IF activity is not behaving as it should . Can you please check if the FE loop is set as sequential or parallel ? try out both the option . I tried to repro the same and for me it works fine . pasting the animation just in case if that helps .

91740-if.gif

Thanks
Himanshu
Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members





if.gif (751.7 KiB)
· 2
5 |1600 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.

Hello @ewinkiser,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, will respond back with the more details and we will try to help .
Thanks
Himanshu

0 Votes 0 ·

Hello @ewinkiser,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, will respond back with the more details and we will try to help .
Thanks
Himanshu

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

Hi @ewinkiser,

Would you please try

@greater(int(item().virtualWorkPercentage), 0)

Thanks!

· 4
5 |1600 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

It is still letting the values of 0 through the IfElse. Do you see how this might be happening? VirtualWorkPercentage is stored as an NVARCHAR in the DB Table.

Thanks
Mike

0 Votes 0 ·

@ewinkiser, values are float or integer?

1 Vote 1 ·

Hi @nasreen-akter

The (item().virtualWorkPercentage), is a string in the ADF mapping....so for the IfElse I want to say if the virtualworkpercentage is greater than 0, process it. The virtualworkpercentage in the DB Table is an NVARCHAR...

Thanks for your response!
Mike

0 Votes 0 ·
Show more comments