Generate a Column of Continuous Dates in BigQuery

#Data Warehouse #Big Query

Generate a table with a column of continuous dates

SELECT
  *
FROM
  UNNEST( GENERATE_DATE_ARRAY( CURRENT_DATE(), DATE('2014-01-01'), INTERVAL -1 DAY) ) AS day

Published: by ;

Lei Ma (2019). 'Generate a Column of Continuous Dates in BigQuery', Datumorphism, 05 April. Available at: https://datumorphism.leima.is/til/data/bigquery-generate-continuous-dates-as-a-column/.

Current Ref:

  • til/data/bigquery-generate-continuous-dates-as-a-column.md