Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Fields are not syncing when I use if condition
Script:
Table:
LOAD ID,
key,
value,
If(key='A', source_value) as FieldA,
If(key='B', source_value) as FieldB,
If(key='C', source_value) as FieldC;
SQL SELECT *
FROM dbo.Table1;
Output:
Or use a group by or even applymap but as Dilipranjith says original data has 3 rows, so 3 rows are loaded and something has to be done to merge in one row.