Welcome to new things

[Technical] [Electronic work] [Gadget] [Game] memo writing

BigQuery

Memo for a slightly elaborate use of BigQuery (etc.)

I usually use Google BigQuery only for simple aggregate SQL, but there are many other useful functions besides aggregate SQL. However, since I don't use it often and when I do try to use it, I start by looking for a manual, so I'll put tog…

A note on a slightly more elaborate use of BigQuery (scheduled queries)

I usually use Google BigQuery only for simple aggregate SQL, but there are many other useful functions besides aggregate SQL. However, since I don't use it often and when I do try to use it, I start by looking for a manual, so I'm going to…

Notes on a slightly more elaborate use of BigQuery (programming)

I usually use Google BigQuery only for simple aggregate SQL, but there are many other useful functions besides aggregate SQL. However, since I don't use it often and when I do try to use it, I start by looking for a manual, so I'll put tog…

Memo for slightly elaborate usage of BigQuery (table creation and data update)

I usually use Google BigQuery only for simple aggregate SQL, but there are many other useful functions besides aggregate SQL. However, since I don't use it often and when I do try to use it, I start by looking for a manual, so I'll put tog…

Memo on how to use BigQuery in a slightly more elaborate way (views, materialized views, table functions)

I usually use Google BigQuery only for simple aggregate SQL, but there are many other useful functions besides aggregate SQL. However, since I don't use it often and when I do try to use it, I start by looking for a manual, so I'll put tog…

Estimate a flat rate for BigQuery.

Since Google BigQuery is pay-as-you-go and relatively inexpensive, I had been using it without much concern about the fees. Big data analysis was a breakthrough in that matters that until now could only be guessed at could actually be expr…

How to load multiple Cloud Storage files together with Google BigQuery's Node.js SDK

When loading Google Cloud Storage files into Google BigQuery, multiple files can be loaded at once. However, I got stuck trying to do that with Google BigQuery's Node.js SDK, so here are my notes on that. Overview and Issues Load using tab…

How to get the last record of a group in SQL

For example, "In a user's event log, I want to extract the last event the user performed." Sometimes you want to retrieve the last record of data divided by groups. The window function can be used to obtain the following WITH tbl AS ( SELE…

Load a MySQL database into BigQuery with schema-less partitioning

BigQuery can handle huge amounts of data, but you don't have to worry about the infrastructure at all (really, at all), and it's fast and cheap, It is tempting to put all your data into BigQuery and process it all with BigQuery. That's why…

How to create a calendar table in Google BigQuery

When aggregating data that jumps around by date, you may want a calendar table. You can create a calendar table in Google BigQuery with the following GENERATE_DATE_ARRAY()" creates a calendar array, and "UNNEST()" expands the array to rows…

Thoughts on using AWS Redshift Spectrum / Athena

We originally used AWS Redshift, but it was quite expensive, so we switched to Google BigQuery. After that, Redshift Spectrum came out, and I was wondering if it might be better than BigQuery, so I touched it and here are my impressions. A…

How to use service accounts across projects in Google Cloud Platform

Google Cloud Platform (GCP) has two types of accounts: user accounts and service accounts. A user account is a Google account, familiarly known as Gmail, that can belong to multiple arbitrary projects. A service account, on the other hand,…