If statement in Azure data factory Pipeine

Rohit Kulkarni 441 Reputation points
2021-03-21T17:54:55.96+00:00

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
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,463 questions
{count} votes