ADF throws an error while using boolean variables in functions expecting bool parameters

Tamer Kadioglu 1 Reputation point
2021-08-09T20:03:33.563+00:00

Hi Everyone,

I have an adf project with git so have different data factories mostly with the same codes.
What I'm trying to do and having different results between data factories is really simple.

I have 2 variables, types are boolean.

121600-image.png

I am seeting those from db without an issue and using them in a pipeline as a parameter.

121781-image.png

Now it works this way BUT before it was set to the values of the variables and it was working in our dev data factory, when we release the code to staging df, it threw an error:

121772-image.png

And I sense that there is a conversion problem between boolean variable type and bool type because as below you can see that json gets the values as string, "true", not true (without quotes)

121754-image-2021-08-06t13-55-35-969z.png

I think it should be working with assigning only variable values, any idea why I got different results between different data factories?
Can be because of df settings too but any idea on this?

Best Regards
Tamer

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,730 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,126 Reputation points Microsoft Employee
    2021-08-11T08:07:36.063+00:00

    Hi @Tamer Kadioglu ,

    Thank you for posting query on Microsoft Q&A Platform.

    Your variables in Master pipeline are declared as Boolean type already. Hence you no need to convert them again to bool using bool() function. Kindly pass your variables as it is in to Parameters of your child pipeline. Make sure, you declare your parameters in child pipeline as Boolean too.

    Please check below gif where I tried same and it was working fine.

    122249-var.gif

    Hope this will help. Please let us know if any further queries. Thank you.

    ---------------------------

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.