Welcome to new things

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

Google Cloud Platform

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…

Using Firestore as a lightweight database

I was working on a program related to GCP and wanted to store some data. It was a one-off piece of data that was not large enough to set up a database, nor was it likely to write a join query between the data. To begin with, setting up a d…

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…

How to call REST APIs with a service account on Google Cloud Platform

Normally, GCP operations can be done via command line tools or client libraries, so we never called the REST API directly. I'm trying out a service called GCP Batch right now, but it's still in preview stage and the command line tools and …

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…

Google Professional Data Engineer Qualification Qualification Test Record

I had the opportunity to take the Google Professional Data Engineer certification exam and I passed! There is not much information about Google Professional Data Engineer certification, so I will try to write a success story for those who …

I want to run Visual Studio Code using only a browser, so I'm going to use Theia, a VSCode-like software, to build an environment where I can code and terminal in a browser.

I use multiple PCs and have Visual Studio Code (VSCode) installed on each PC. I often think that if VSCode could be used on a browser, it would be easier to use the same environment anytime without the need for setup. GitHub Codespaces is …

Thoughts on using both Google Firebase and AWS Amplify

I had hoped to be able to create a quick SPA site on the spur of the moment, but I had given up on React because it is too big a job to create even a small site. However, I recently started touching Recoil for React, and with Recoil, React…

Using GCP to monitor goroutine leaks in the Go language as effortlessly as possible

Goroutine Leak The Go language is a fascinating language because it is so easy to create goroutines (like threads). However, since the goroutine is executed separately from the main flow, it was unnoticed when the goroutine process stopped…

How to notify Slack or email when an error occurs in a container with Google Kubernetes Engine (GKE)

This is a way to notify external parties such as Slack or email when an error occurs in a program in GCP's Kubernetes (GKE). You do not have to implement your own error detection mechanism, only GCP settings can do this. How it works When …

How to switch between multiple clusters in kubectl

We have added a new Kubernetes cluster and configured it to be switched with the kubectl command. Once you set it up, you don't have to tweak it, and if you don't, you'll forget how to do it, so I'll write down how to set it up for myself.…

How to switch between multiple accounts and projects in Google Cloud SDK (gcloud)

We added a new project to Google Cloud Platform and set up the Google Cloud SDK (gcloud CLI) to switch projects. Once you set it up, you don't have to tweak it, and if you don't, you'll forget how to do it, so I'll write down how to set it…

I thought I shouldn't use "latest" in Dockerfile tags.

Periodically, AWS S3 files are copied to Google Cloud Storage. There are many ways to copy, but here we use the gsutil command for the Google Cloud SDK, The Google Cloud SDK uses a Docker image of Alpine Linux. However, at some point, I st…

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 distinguish between files and directories in Google Cloud Storage

In Google Cloud Storage, I tried to get a list of files in a subdirectory and process those files. However, when I looked at the error message that the file was wrong, I found that the list of files retrieved included a subdirectory. Reaso…

How to get a subdirectory listing of Google Cloud Storage with Node.js

We previously used the GCP Pyhton library to get a list of Google Cloud Storage subdirectories, and this is the Node.js version of that. Python version is here www.ekwbtblog.com procedure The GCP Node.js SDK documentation is kind enough to…

Using the cloud means constant maintenance costs

I received an email from Google Cloud Platform. The Node.js version of the function I originally created for Gooble Cloud Functions was version 6, and this time the version 6 service was ending, so the email was a request for an upgrade. I…

How to access AWS S3 from Spark (Google Dataproc)

How to access AWS S3 from Spark (Google Dataproc). procedure Spark Configuration The following Spark and Haddop settings will allow you to read and write AWS S3 files from Spark. Load the following AWS-related jar files into Spark aws-java…

How to access Microsoft SQL Server (Azure SQL Database) from Spark (Google Dataproc)

How to access Microsoft SQL Server (Azure Database) from Spark (Google Dataproc). procedure Spark Configuration The following Spark settings will allow you to read and write SQL Server data from Spark. Download the MS SQL Server JDBC jar f…

How to access MySQL from Spark (Google Dataproc)

How to access MySQL from Spark (Google Dataproc). Since it is accessed using JDBC, it can be applied to other RDBs such as PostgreSQL. procedure Spark Configuration The following Spark settings will allow you to read and write MySQL data f…

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 get a subdirectory listing of Google Cloud Storage using Python

I wanted to get a list of Google Cloud Storage subdirectories using the GCP Python library, I got stuck, so here's a note on how and why. Libraries in other languages are API wrappers as well as Python libraries, so I think they can be app…

How to automatically renew Let's Encrypt on Kubernetes (GKE) (wildcard certificate)

It was convenient to use "cert-manager" + DNS authentication to automatically update Let's Encrypt on Kubernetes (GKE) without processing on the service side. I wrote Introductory note before, but the procedure had changed, so I rewrote it…

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…

How to automatically update Let's Encrypt on Kubernetes (GKE)

PS Since the procedure had changed, we have rewritten it in a separate article, along with how to obtain a wildcard certificate. www.ekwbtblog.com Postscript ends here (original article below) It was convenient to use "cert-manager" + DNS …

How to communicate HTTPS with Kubernetes (GKE) (Ingress version)

This is a summary of how to communicate over HTTPS with Kubernetes (GKE) on Google Cloud Platform. Introduction. To allow Kubernetes to communicate with the outside world Method by Service Methods by Ingress There are two ways to do this. …

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,…