I have 2 data sources FirstAPI and SecondAPI:
FirstAPI
| appId | policyTypeName | policyTypeId |
|---|---|---|
| abcd | Global | null |
| pqrs | null | 1 |
| pqws | Global | null |
SecondAPI
| policyTypeName | policyTypeId |
|---|---|
| Americas | 1 |
| Global | 2 |
The values are all one-to-one mapping.
RESULT : I am trying to add a column to FirstAPI so that it can look like the following:
| appId | policyTypeName | policyTypeId | newCol |
|---|---|---|---|
| abcd | Global | null | Global |
| pqrs | null | 1 | Americas |
| pqws | Global | null | Global |
I am trying to write a query in the advanced editor so that I can add newCol in FirstAPI. My attempt is to use something similar:
if [policyTypeName] = null
then SecondAPI[policyTypeName] where SecondAPI[policyTypeId]=[policyTypeId]
else [policyTypeName]
