title: Date Range-Partition in Bigquery
body: <p>I am trying to range-partition a table on type integer or date. In case one, when I partition on integer, it works fine with the following query like so.</p>
  <pre><code>CREATE TABLE `project-id.dataset.parted_employee_int`
  PARTITION BY RANGE_BUCKET(employee_id, GENERATE_ARRAY(1, 100000, 5000)) AS 
  select employee_id, full_name, birth_date from `project-id.dataset.employee`;
  </code></pre>
  <p>I am trying to extend this query for date range-partition as well. Like so.</p>
  <pre><code>CREATE TABLE `project-id.dataset.parted_employee_date`
  PARTITION BY RANGE_BUCKET(birth_date, GENERATE_DATE_ARRAY(CAST('1912-07-09' AS DATE), CAST('1979-06-23' AS DATE), INTERVAL 2 MONTH)) AS
  select employee_id, full_name, birth_date from `project-id.dataset.employee`;
  </code></pre>
  <p>But I'm getting the following error:</p>
  <pre><code>PARTITION BY expression must be DATE(&lt;timestamp_column&gt;), DATE(&lt;datetime_column&gt;), DATETIME_TRUNC(&lt;datetime_column&gt;, DAY/HOUR/MONTH/YEAR), a DATE column, TIMESTAMP_TRUNC(&lt;timestamp_column&gt;, DAY/HOUR/MONTH/YEAR), DATE_TRUNC(&lt;date_column&gt;, MONTH/YEAR), or RANGE_BUCKET(&lt;int64_column&gt;, GENERATE_ARRAY(&lt;int64_value&gt;, &lt;int64_value&gt;[, &lt;int64_value&gt;]))
  </code></pre>
  <p>how to rang-partition on date ?  Is there a way ?</p>