title: Extracting variant/json data in Snowflake
body: <p>I have a column, let's say variant_column, which has data that looks exactly like this (this would be one row of data):</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>[
    {
      "key": "column_name_1",
      "value": "value_goes_here"
    },
    {
      "key": "metadata",
      "value": "{this_could_be_another_huge_json_here}"
    },
    {
      "key": "column_name_2",
      "value": "value_goes_here_again"
    },
    {
      "key": "column_name_3",
      "value": "value_goes_here_yet_again"
    }
  ]</code></pre>
  </div>
  </div>
  </p>
  <p>How can I query for a specific key value? I.e., I want the results of my query to look like:</p>
  <pre><code>column_name_1
  value_goes_here
  more values...for each row of data
  </code></pre>
  <p>Each row will always have &quot;key&quot;: &quot;column_name_1&quot; and an associated value which can change. I've tried:</p>
  <pre><code>get_path(variant_column, '&quot;key&quot;: &quot;column_name_1&quot;')
  get_path(variant_column, 'column_name_1')
  </code></pre>
  <p>and a few others, but the fact that every entry in the variant will have &quot;key&quot; and &quot;value&quot; is messing me up. How can I create a single column from &quot;column_name_1&quot; (they key will always be &quot;column_name_1&quot;) and the associated &quot;value&quot; (it will always be called &quot;value&quot;, but the actual data for &quot;value&quot; will be different).</p>