title: Snowflake - Lateral cannot be on the left side of join
body: <p>I have a variant data type that I am performing a lateral flatten on but I then need to left join one of the json elements to lookup the value for the corresponding ID from another relational table within Snowflake.  When I do this it gives me the error &quot;Lateral View cannot be on the left side of join&quot; which doesn't make sense because if I don't include the outer join an create the view and then create an additional view on top of this view, it allows me to perform a left join.</p>
  <p>Example:</p>
  <pre><code>create or replace view  my_view
  copy grants
  as
  select 
      rowid as row_id,
      siteData.value:siteID::int as site_id,
      es.site_name AS site_name
  from 
      &quot;RAW_DATA&quot; raw, 
      lateral flatten(datamap:data, outer =&gt; true) siteData
      LEFT join ext_site es on es.siteid = siteData.value:siteID
  ;
  </code></pre>