Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a file with 5 fields. for example
If Field1, Field2, Field3 values are same then i need to update Field4 and Field5 values according to file in dashboard.
Dashboard already has these fileds. So i need to update Field4 and Field5 colums according to file.
How can we implement?
I have attached sample file here.
I see what you mean now. Why don't you use a Mapping Load to make update. Create two mapping tables, one for field4 and other for field 5
MappingTable1:
Mapping
LOAD Field1&'|'&Field2&'|'&Field3 as Key,
Field4
FROM ....;
MappingTable2:
Mapping
LOAD Field1&'|'&Field2&'|'&Field3 as Key,
Field5
FROM ....;
FactTable:
LOAD ....,
ApplyMap('MappingTable1', Field1&'|'&Field2&'|'&Field3, Field4) as Field4,
ApplyMap('MappingTable1', Field1&'|'&Field2&'|'&Field3, Field5) as Field5
....;
Or you can do a left join.....
Would you be able to provide a sample with expected output?
Hi Sunny thanks for your response.
I have attached sample file to original post.
I see what you mean now. Why don't you use a Mapping Load to make update. Create two mapping tables, one for field4 and other for field 5
MappingTable1:
Mapping
LOAD Field1&'|'&Field2&'|'&Field3 as Key,
Field4
FROM ....;
MappingTable2:
Mapping
LOAD Field1&'|'&Field2&'|'&Field3 as Key,
Field5
FROM ....;
FactTable:
LOAD ....,
ApplyMap('MappingTable1', Field1&'|'&Field2&'|'&Field3, Field4) as Field4,
ApplyMap('MappingTable1', Field1&'|'&Field2&'|'&Field3, Field5) as Field5
....;
Or you can do a left join.....