Hi all!
I have two data sources: postgresql and mysql.
I have a panel variable $var. Depending on its value I have two scenarios:
- if $var == 1 then the first data source returns:
a | b | c | d |
---|---|---|---|
a1 | b1 | c1 | d1 |
a2 | b2 | c2 | d2 |
… | … | … | … |
And the second data source returns:
a | e |
---|---|
a1 | e1 |
a2 | e2 |
… | … |
I use join by field transformation: mode inner on field ‘a’. And everything works fine, just like I want it to. But I have the second scenario…
- if $var == 0 then first data source returns the exact same thing as in the first scenario but with the first column null:
a | b | c | d |
---|---|---|---|
null | b1 | c1 | d1 |
null | b2 | c2 | d2 |
… | … | … | … |
And the second data source always returns nothing.
So, I want to apply join transformation only for the first scenario, but not for the second one.
Is there any way to apply inner join transformation depending on the value of the variable $var?
Thanks!
P.S.
Also, this inner join transformation works in a strange way. I have two dataframes: one is empty and the other is not. But the transformation somehow joins the data anyway, although based on mathematical logic it should not.