What is the difference between the use of LATERAL FLATTEN(...)
and TABLE(FLATTEN(...))
in Snowflake? I checked the documentation on FLATTEN
, LATERAL
and TABLE
and cannot make heads or tails of a functional difference between the following queries.
select
id as account_id,
account_regions.value::string as region
from
salesforce.accounts,
lateral flatten(split(salesforce.accounts.regions, ', ')) account_regions
select
id as account_id,
account_regions.value::string as region
from
salesforce.accounts,
table(flatten(split(salesforce.accounts.regions, ', '))) account_regions