with a as (
select ‘first’ as commaheader , ‘’ as b
union all
select ‘first,second’ as commaheader , ‘second’ as b
union all
select ‘first,second,third’ as commaheader ,‘second’ as b
union all
select ‘second’ as commaheader ,‘second’ as b
union all
select ‘fourth’ as commaheader ,‘’ as b
union all
select ‘fifth’ as commaheader,‘’ as b
)
select commaheader , b from a
Hi @sagar2agrawal - Did @Koushik_Muthanna’s suggestion answer your question? If so, please help the community out by marking this answer as “Solution!”
Thanks, @Koushik_Muthanna for taking the time and giving a detailed answer, really appreciate it,
From the glance, it seems it will work for values (first, second), but it might not work for first, third. (Like what are saying we are trying to replicate a function like postgresql in operator, where we don’t know the array size as it is not fixed)
where all rows should be printed if either of the input array elements (comma separated in tag values) is present in the array of the dataset column field (we can transform to comma-separated values).
Thanks for the update. Yes with a non fixed size array this would be mean creating a column for each value. This is not possible in the current scenario with RLS.