title: JSON Flattening and table creation
body: <p>Could somebody help me to create an SQL statement to flatten JSON data in Snowflake Table1 table, in one JSON_DATA column that has an array?</p>
  <p><strong>JSON Data</strong></p>
  <pre><code>{
    &quot;id&quot;: &quot;1234-567-890&quot;,
    &quot;parent_id&quot;: &quot;00-123-safsf-3345&quot;,
    &quot;data&quot;: [
      {
        &quot;id&quot;: &quot;sfsfd-234-fgf-55-4545&quot;,
        &quot;values&quot;: [
          {
            &quot;name&quot;: &quot;one&quot;,
            &quot;value&quot;: &quot;32&quot;
          },
          {
            &quot;name&quot;: &quot;Two&quot;,
            &quot;value&quot;: &quot;MMAD&quot;
          },
          {
            &quot;name&quot;: &quot;three&quot;,
            &quot;value&quot;: &quot;&quot;
          },
          {
            &quot;name&quot;: &quot;four&quot;,
            &quot;value&quot;: &quot;Bacra-Dacra&quot;
          },
          {
            &quot;name&quot;: &quot;five&quot;,
            &quot;value&quot;: &quot;33-5455-9&quot;
          },
          {
            &quot;name&quot;: &quot;six&quot;,
            &quot;value&quot;: &quot;&quot;
          },
          {
            &quot;name&quot;: &quot;seven&quot;,
            &quot;value&quot;: &quot;4056&quot;
          },
          {
            &quot;name&quot;: &quot;eight&quot;,
            &quot;value&quot;: &quot;TUU-WWW&quot;
          },
          {
            &quot;name&quot;: &quot;nine&quot;,
            &quot;value&quot;: &quot;&quot;
          },
          {
            &quot;name&quot;: &quot;ten&quot;,
            &quot;value&quot;: &quot;234234&quot;
          }
        ]
      },
      {
        &quot;id&quot;: &quot;asdfsdfsdf-23423-fsff-3445435&quot;,
        &quot;values&quot;: [
          {
            &quot;name&quot;: &quot;One&quot;,
            &quot;value&quot;: &quot;32&quot;
          },
          {
            &quot;name&quot;: &quot;Two&quot;,
            &quot;value&quot;: &quot;MMDI&quot;
          },
          {
            &quot;name&quot;: &quot;Three&quot;,
            &quot;value&quot;: &quot;&quot;
          },
          {
            &quot;name&quot;: &quot;four&quot;,
            &quot;value&quot;: &quot;THis is a Test&quot;
          },
          {
            &quot;name&quot;: &quot;five&quot;,
            &quot;value&quot;: &quot;11-4543535-2&quot;
          },
          {
            &quot;name&quot;: &quot;six&quot;,
            &quot;value&quot;: &quot;&quot;
          },
          {
            &quot;name&quot;: &quot;seven&quot;,
            &quot;value&quot;: &quot;4056&quot;
          },
          {
            &quot;name&quot;: &quot;eight&quot;,
            &quot;value&quot;: &quot;ert erte&quot;
          },
          {
            &quot;name&quot;: &quot;nine&quot;,
            &quot;value&quot;: &quot;&quot;
          },
          {
            &quot;name&quot;: &quot;ten&quot;,
            &quot;value&quot;: &quot;343534&quot;
          }
        ]
      }
    ]
  }
  
  </code></pre>
  <p>Table Format required :</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">id</th>
  <th style="text-align: center;">one</th>
  <th style="text-align: center;">two</th>
  <th style="text-align: center;">three</th>
  <th style="text-align: center;">four</th>
  <th style="text-align: center;">five</th>
  <th style="text-align: center;">six</th>
  <th style="text-align: center;">seven</th>
  <th style="text-align: center;">eight</th>
  <th style="text-align: center;">nine</th>
  <th style="text-align: center;">ten</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">sfsfd-234-fgf-55-4545</td>
  <td style="text-align: center;">32</td>
  <td style="text-align: center;">MMAD</td>
  <td style="text-align: center;">:--:</td>
  <td style="text-align: center;">Bacra-Dacra</td>
  <td style="text-align: center;">33-5455-9</td>
  <td style="text-align: center;">4056</td>
  <td style="text-align: center;">TUU-WWW</td>
  <td style="text-align: center;"></td>
  <td style="text-align: center;">234234</td>
  <td style="text-align: center;"></td>
  </tr>
  <tr>
  <td style="text-align: left;">asdfsdfsdf-23423-fsff-3445435</td>
  <td style="text-align: center;">32</td>
  <td style="text-align: center;">MMDI</td>
  <td style="text-align: center;">:--:</td>
  <td style="text-align: center;">THis is a Test</td>
  <td style="text-align: center;">11-4543535-2</td>
  <td style="text-align: center;">4056</td>
  <td style="text-align: center;">ert erte</td>
  <td style="text-align: center;"></td>
  <td style="text-align: center;">343534</td>
  <td style="text-align: center;"></td>
  </tr>
  </tbody>
  </table>
  </div>