LoginSignup
0
0

BigQueryで数値列(string)を日付(date)に変換する方法

Last updated at Posted at 2023-10-31

PARSE_DATE関数を使う!

RedshiftではCAST関数を使用していたのだが、BigQueryで数値列を日付に変換する方法を調査した。
結論から言うと、PARSE_DATE(%Y%m%d, 変換元カラム名)で変換できる。

実行結果

クエリ

スクリーンショット 2023-10-31 9.30.22.png

実行結果

スクリーンショット 2023-10-31 9.30.29.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0