<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>BigQuery on Lin's Blog</title><link>https://coder.tw/ja/tags/bigquery/</link><description>Recent content in BigQuery on Lin's Blog</description><generator>Hugo</generator><language>ja-JP</language><lastBuildDate>Sun, 17 Sep 2017 13:39:48 +0000</lastBuildDate><atom:link href="https://coder.tw/ja/tags/bigquery/index.xml" rel="self" type="application/rss+xml"/><item><title>BigQuery SQL の文字列分割（SPLIT）</title><link>https://coder.tw/ja/posts/bigquery-sql-string-split/</link><pubDate>Sun, 17 Sep 2017 13:39:48 +0000</pubDate><guid>https://coder.tw/ja/posts/bigquery-sql-string-split/</guid><description>&lt;p&gt;split は、プログラマーなら誰もが馴染みのある関数で、最もよく使われる関数の 1 つといえるでしょう。BigQuery にも split がありますが、SQL であるため一般的なプログラミング言語とは使い方がかなり異なります。さらに BigQuery には Standard SQL と Legacy SQL の 2 つがあり、どちらにも split はありますが、使い方はまったく異なります。&lt;/p&gt;</description></item><item><title>BigQuery の Google スプレッドシート連携テーブルで Access Denied エラーが出る</title><link>https://coder.tw/ja/posts/bigquery-federate-google-sheet-table-occur-access-denied-error/</link><pubDate>Thu, 14 Sep 2017 21:45:47 +0000</pubDate><guid>https://coder.tw/ja/posts/bigquery-federate-google-sheet-table-occur-access-denied-error/</guid><description>&lt;p&gt;BigQuery では、テーブルを Google Drive 上の Google スプレッドシートにリンクさせることができ、スプレッドシートを変更するとテーブルもすぐに追随します。この連携テーブル（Federated Table）を使うと、Access Denied の問題に遭遇することがあります。WebUI でのクエリは問題ないのに、bq コマンドラインツールでクエリすると、次のエラーメッセージが表示されます。&lt;/p&gt;
&lt;blockquote&gt;Access Denied: BigQuery
BigQuery: No OAuth token with Google Drive scope was found&lt;/blockquote&gt;</description></item><item><title>BigQuery SQL で指定日付から月初日・月末日を取得する</title><link>https://coder.tw/ja/posts/bigquery-sql-get-first-or-last-day-of-month-from-specify-date/</link><pubDate>Sat, 29 Jul 2017 18:38:56 +0000</pubDate><guid>https://coder.tw/ja/posts/bigquery-sql-get-first-or-last-day-of-month-from-specify-date/</guid><description>&lt;p&gt;BigQuery で日付（またはタイムスタンプ、DATETIME 型）から月初日を取得したい場合、たとえば &amp;ldquo;2017-05-24&amp;rdquo; から &amp;ldquo;2017-05-01&amp;rdquo; を得たいときは、Legacy SQL では UTC_USEC_TO_MONTH 関数を、Standard SQL では DATE_TRUNC() 関数を使えます。実は BigQuery には、日付から月初日・時間・週の初めなどを取得するための関数が一式そろっています。&lt;/p&gt;</description></item><item><title>BigQuery SQL でランダムに N 行を抽出する</title><link>https://coder.tw/ja/posts/bigquery-get-random-n-row-sampling-legacy-sql-standard-sql/</link><pubDate>Fri, 28 Jul 2017 23:57:37 +0000</pubDate><guid>https://coder.tw/ja/posts/bigquery-get-random-n-row-sampling-legacy-sql-standard-sql/</guid><description>&lt;p&gt;データ分析をしていると、データからランダムに N 行を取り出す（サンプリングする）ことはよくある要件です。データが正しいかどうかを確認するためにサンプルを見る場合もあれば、データが多すぎて処理しきれないため、モデル構築用にサンプルを取る場合もあります。データベース内で SQL を使ってサンプリングするのは実はとても簡単です。ここでは BigQuery Standard SQL で説明しますが、Legacy SQL でも方法は同じです。&lt;/p&gt;</description></item><item><title>端午の連休、渋滞にさよなら――宜蘭編</title><link>https://coder.tw/ja/posts/dragon-boat-festival-yilan-traffic/</link><pubDate>Fri, 10 Jun 2016 14:29:03 +0000</pubDate><guid>https://coder.tw/ja/posts/dragon-boat-festival-yilan-traffic/</guid><description>&lt;p&gt;久しぶりの更新になりましたが、ようやく新しい記事を投稿します！ 2016 年の端午節の連休、台北の友人の多くはきっと宜蘭を最初の行き先に選ぶのではないでしょうか。車でもバスでも、国道 5 号の雪山トンネルを通れば、&lt;strong&gt;うまくいけば&lt;/strong&gt;約 40 分で宜蘭に着きます。もちろん、こうした連休にそう順調にいかないことは、みなさんご存じですよね……。今日は雪山トンネルの渋滞パターンを分析して、混雑を避けて宜蘭にスムーズに着けるようにしたいと思います！ 以下に簡単な技術的な説明と分析の過程をまとめますので、技術の話が苦手な方は結論だけ読んでください！ なお、私は今日宜蘭にいて、この記事は実は金車の「伯朗咖啡城堡（ブラウンカフェ城）」で書いています。&lt;/p&gt;</description></item></channel></rss>