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.
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
Post a Comment