I have the below input table with array values in it. To get the expected output I've tried array_contains, but wasn't able to get it.
The array index numbers should exactly match between the two columns
Input:
+---------------+------------------+--------------------+
|ID |col_List |col_ID |
+---------------+------------------+--------------------+
|10001 |["T1","T2] |["100","200"] |
+---------------+------------------+--------------------+
|10002 |["T2"] |["300"] |
+---------------+------------------+--------------------+
|10003 |["T1","T2","T3"] |["150","220","580" |
+---------------+------------------+--------------------+
Expected output:
+---------------+--------+--------+--------+
|ID |T1 |T2 |T3 |
+---------------+--------+--------+--------+
|10001 |100 |200 |null |
+---------------+--------+--------+--------+
|10002 |null |300 |null |
+---------------+--------+--------+--------+
|10003 |150 |220 |580 |
+---------------+--------+--------+--------+