question

RohitKulkarni-3496 avatar image
0 Votes"
RohitKulkarni-3496 asked HimanshuSinha-MSFT commented

If statement in Azure data factory Pipeine

Hello Team

I am passing the parameter in array.If the parameter is null then it must return all the values present in the column of the table

Table :TABLE_NAME

I have used this formula after where clause.If i pass the Values for companies the value will appear and if i keep null then it is returning zero value. But i need all the value present in the columns
plz advise

LEFT(t.TABLE_NAME,CHARINDEX('$',t.TABLE_NAME) - 1) IN ('@{
if(lessOrEquals(length(pipeline().parameters.Companies),1),
join(pipeline().parameters.Companies,''),
concat(join(pipeline().parameters.Companies,''','''))
)}') OR ('@{
if(lessOrEquals(length(pipeline().parameters.Companies),1),
join(pipeline().parameters.Companies,''),
concat(join(pipeline().parameters.Companies,''','''))
)}') IS NULL

Thanks

RK

azure-data-factory
· 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 @RohitKulkarni-3496 ,
Thanks for the ask and using the Microsoft Q&A platform .

Can you please share ultimate SQL query which you are trying to build ?
I think you can use coalesce

Please do let me know how it goes .
Thanks
Himanshu


0 Votes 0 ·

Hello @RohitKulkarni-3496 ,

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 ·

0 Answers