title: Athena UNION - do I need to define struct columns?
body: <p>I have a bunch of tables in Athena that contain structs with different nested columns. I'd like to query from all of those tables as a single table (ie, a union view) and I'd like to be able to return the nested column from the struct only if it exists, otherwise return a null.</p>
  <p>Example:</p>
  <pre><code>Table1: 
  email
  record: {email, first_name, last_name}
  
  Table2:
  email
  record: {email, dob}
  </code></pre>
  <p>I'd like to be able to union those and then query on the common email column. Then do something like <code>record.first_name</code> to generate a column populated with data from Table1 rows and a null value for Table 2 rows.</p>
  <p>I've tried wrapping a try() block around the attribute, and that resulted in a &quot;column cannot be resolved&quot; error.</p>
  <p>Is this possible? Or do I need to define the struct columns in the view/union query?</p>