Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have a field called Sales Type with 4 values Import, Domestic, Export, and Other. Besides this field, I have other fields in the load script as well. The data comes from 2 sources (A and B), which have their own section in the load script.
Source A has all Import, Domestic, Export, and Other
Source B doesn’t have Domestic but has the other three
I would like to lump the data of Other and Domestic together and rename the new field to Other/Domestic in Source A. Source B I would like to rename Other to Other/Domestic so that both source can connect.
Is this possible to do? Is there anything I should add to the load script of each source to make this happens?
Hi, @Sttran
Like this?
- Load Script
SourceA:
Load
SalesType As SalesTypeA,
ValueA,
If(SalesType = 'Domestic' Or SalesType = 'Other', 'Other/Domestic', SalesType) As "Other/Domestic"
Inline [
SalesType, ValueA
Import, A
Domestic, B
Export, C
Other, D
];
SourceB:
Load
SalesType As SalesTypeB,
ValueB,
If(SalesType = 'Other', 'Other/Domestic', SalesType) As "Other/Domestic"
Inline [
SalesType, ValueB
Import, A
Export, C
Other, D
];
- Visualizstion
(Select Other/Domestic)