title: Metabase: Date Range filter to dashboards created by native query
body: <p>I use <a href="https://www.metabase.com" rel="nofollow noreferrer">Metabase</a> for data visualization.</p>
  
  <p><a href="http://druid.io/" rel="nofollow noreferrer">Druid</a> (imply-2.2.3) is data storage.</p>
  
  <p>Created <strong>Metabase Questions</strong> I put on the dashboard and filter them all by <strong>Date Range</strong>.</p>
  
  <p>When I try to add Date Range filter to question created by native query, metabase just can't find timestamp field for filtering and says: '<strong>No valid fields</strong>':
  <a href="https://i.stack.imgur.com/ExRe6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ExRe6.png" alt="enter image description here"></a></p>
  
  <p>Same problem even if I convert question, created by UI constructor to native query by using  "<strong>View native query</strong>" option:</p>
  
  <p><a href="https://i.stack.imgur.com/KiaSv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KiaSv.png" alt="enter image description here"></a></p>
  
  <p>Generated Native query to Druid:</p>
  
  <pre><code>{
      "intervals": ["1900-01-01/2100-01-01"],
      "granularity": {
          "type": "period",
          "period": "P1D",
          "timeZone": "UTC"
      },
      "context": {
          "timeout": 60000
      },
      "queryType": "timeseries",
      "dataSource": "DotmailerCampaign",
      "aggregations": [{
          "type": "javascript",
          "name": "sum",
          "fieldNames": ["numOpens"],
          "fnReset": "function() { return 0 ; }",
          "fnAggregate": "function(current, x) { return current + (parseFloat(x) || 0); }",
          "fnCombine": "function(x, y) { return x + y; }"
      }],
      "descending": false
  }
  </code></pre>
  
  <p>What is missed?</p>