<?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/en/tags/bigquery/</link><description>Recent content in BigQuery on Lin's Blog</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 17 Sep 2017 13:39:48 +0000</lastBuildDate><atom:link href="https://coder.tw/en/tags/bigquery/index.xml" rel="self" type="application/rss+xml"/><item><title>BigQuery SQL String Split</title><link>https://coder.tw/en/posts/bigquery-sql-string-split/</link><pubDate>Sun, 17 Sep 2017 13:39:48 +0000</pubDate><guid>https://coder.tw/en/posts/bigquery-sql-string-split/</guid><description>&lt;p&gt;Most programmers are familiar with split. It&amp;rsquo;s one of the ten most commonly used functions in programming. BigQuery has a split function too, but since it&amp;rsquo;s SQL, the usage is quite different from general-purpose programming languages. On top of that, BigQuery comes in two versions, Standard SQL and Legacy SQL. Both have split, but they are used in completely different ways.&lt;/p&gt;</description></item><item><title>BigQuery Federated Google Sheets Table Access Denied Error</title><link>https://coder.tw/en/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/en/posts/bigquery-federate-google-sheet-table-occur-access-denied-error/</guid><description>&lt;p&gt;BigQuery lets you link a table to a Google Sheet stored in Google Drive, so the table updates right away whenever the Google Sheet changes. When you use this kind of federated table, some people run into an Access Denied error. Queries in the WebUI work fine, but when you query the table with the bq command line tool, you get the following error message:&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 Get First or Last Day of Month From a Specified Date</title><link>https://coder.tw/en/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/en/posts/bigquery-sql-get-first-or-last-day-of-month-from-specify-date/</guid><description>&lt;p&gt;In BigQuery, if you want to get the first day from a date (or a timestamp or datetime value), for example turning &amp;ldquo;2017-05-24&amp;rdquo; into &amp;ldquo;2017-05-01&amp;rdquo;, you can call the UTC_USEC_TO_MONTH function in Legacy SQL, or DATE_TRUNC() in Standard SQL. In fact, BigQuery has a whole series of functions that do these things, getting the first day, hour, week, and so on from a date.&lt;/p&gt;</description></item><item><title>BigQuery SQL Get Random N Row Sampling</title><link>https://coder.tw/en/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/en/posts/bigquery-get-random-n-row-sampling-legacy-sql-standard-sql/</guid><description>&lt;p&gt;When doing data analysis, randomly picking N rows from a dataset (sampling) is a very common need. You might sample to check whether the data is correct, or sample so a model can be built when there is too much data to process comfortably. Sampling with SQL inside the database is actually very simple. Here I&amp;rsquo;ll demonstrate with BigQuery Standard SQL, but Legacy SQL works the same way.&lt;/p&gt;</description></item><item><title>Dragon Boat Festival Holiday: Saying Goodbye to Traffic Jams - Yilan Edition</title><link>https://coder.tw/en/posts/dragon-boat-festival-yilan-traffic/</link><pubDate>Fri, 10 Jun 2016 14:29:03 +0000</pubDate><guid>https://coder.tw/en/posts/dragon-boat-festival-yilan-traffic/</guid><description>&lt;p&gt;It&amp;rsquo;s been nearly a year since my last article, and I&amp;rsquo;m finally publishing a new one! During the 2016 Dragon Boat Festival holiday, I&amp;rsquo;m sure many friends from Taipei will choose Yilan as their first destination. Whether you drive or take a bus, if you go through the Xueshan Tunnel on National Freeway No. 5, it takes only about 40 minutes to reach Yilan &lt;strong&gt;if all goes well&lt;/strong&gt;. Of course, everyone knows that during a holiday like this, things are rarely that smooth&amp;hellip; Today I&amp;rsquo;m going to analyze the traffic patterns of the Xueshan Tunnel so you can avoid the crowds and get to Yilan smoothly! Below there will be a short technical explanation and the analysis process; if you&amp;rsquo;re not technically inclined, you can jump straight to the conclusion! By the way, I&amp;rsquo;m in Yilan today, and this article was actually written at the Brown Cafe Castle.&lt;/p&gt;</description></item></channel></rss>