beam
beam copied to clipboard
LEFT JOIN LATERAL support?
Is it possible to construct a LEFT JOIN LATERAL query using beam? I've tried to combine lateral_
and leftJoin_
(and subselect_
) in a few different ways but I couldn't figure out how to get the state threads to line up properly.
For reference, I'm looking to build a query like this:
SELECT request_json, real_ip
FROM request_logs
LEFT JOIN LATERAL jsonb_array_elements(request_logs.request_json->'headers') real_ip
ON real_ip->>0 ILIKE 'X-Real-IP';