How to convert Timestamp to Date Data Type in Google Bigquery -


i trying convert timestamp data type columns date datatype using:

bq query -q --destination_table=new_date_table --replace "select date(curr_dt) curr_dt test.date_table"

the new table shows column string rather date. there way convert timestamp date datatype.

requested screenshot

if use standard sql, can following:

select * replace(extract(date curr_dt)) curr_dt test.date_table 

if curr_dt repeated field, solution following:

select * replace(   array(     select extract(date curr_dt) t.curr_dt   ) curr_dt) test.date_table t 

Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -