name と type は必須。mode のデフォルト値は Nullable。
$ bq mkdef --noautodetect --source_format=GOOGLE_SHEETS \
| explore: sample { | |
| join: sample2 { | |
| type: left_outer | |
| relationship: many_to_one | |
| sql_on: ${sample.medium} = ${sample2.medium} ;; | |
| } | |
| } | |
| view: sample { | |
| derived_table: { |
name と type は必須。mode のデフォルト値は Nullable。
$ bq mkdef --noautodetect --source_format=GOOGLE_SHEETS \
| select | |
| job_type | |
| , user_email | |
| , referenced_tables.dataset_id | |
| , round(sum(total_bytes_billed) / pow(10, 9), 2) AS total_gb_billed | |
| from | |
| `region-us.INFORMATION_SCHEMA.JOBS_BY_PROJECT` | |
| , UNNEST(referenced_tables) AS referenced_tables | |
| WHERE CAST(creation_time AS DATE) = DATE('2021-11-18') | |
| group by job_type, user_email, referenced_tables.dataset_id |
| EXPIRE_SEC := $(shell expr 24 '*' 60 '*' 60) | |
| KERNEL := $(shell uname | tr '[:upper:]' '[:lower:]') | |
| MITAMAE_BIN_DIR := bin | |
| MITAMAE_REPO := itamae-kitchen/mitamae | |
| MITAMAE := $(MITAMAE_BIN_DIR)/mitamae | |
| MITAMAE_ARCH_BIN := mitamae-x86_64-$(KERNEL) | |
| MITAMAE_LATEST_TAR_BALL_URL := https://github.com/$(MITAMAE_REPO)/releases/latest/download/$(MITAMAE_ARCH_BIN).tar.gz | |
| MITAMAE_LATEST_VERSION := $$(curl -s https://api.github.com/repos/$(MITAMAE_REPO)/releases/latest | jq -r .tag_name) |
| --- Makefile.orig 2020-03-26 22:38:05.000000000 +0900 | |
| +++ Makefile 2020-03-26 22:39:57.000000000 +0900 | |
| @@ -1,9 +1,10 @@ | |
| +DIRENV := direnv | |
| MAKE := make | |
| TARGETS := aws heroku | |
| define make-r | |
| @for i in $(TARGETS); do \ | |
| - $(MAKE) -w -C terraform/$$i $(1) || exit $$?; \ |
| . | |
| ├── Makefile # (1) | |
| └── terraform | |
| ├── aws | |
| │ ├── Makefile # (2) | |
| │ └── main.tf | |
| └── heroku | |
| ├── Makefile # (3) | |
| └── main.tf |
| require: | |
| - ./lib/rubocop/cop/hoge |
| # @abstract One-shot 関連のジョブは必ずこの class を継承し、 | |
| # キーワード引数に :global_executions を要求する #perform を実装すること | |
| class OneshotBaseJob < ApplicationJob | |
| class << self | |
| # Retry the One-shot job due to the exception | |
| # | |
| # @param job [OneshotBaseJob] A One-shot job class to retry | |
| # @return [void] | |
| # | |
| # @note See ActiveJob::Exceptions::ClassMethods#retry_on for the parameters except to `job` |
| if (/esa\.io\/#path=%2FArchived%2F/.test(location.href)) { | |
| location.href = location.href.replace(/#path=%2FArchived%2F/, '#path=%2F'); | |
| } else if (/esa\.io\/#path=%2F/.test(location.href)) { | |
| location.href = location.href.replace(/#path=%2F/, '#path=%2FArchived%2F'); | |
| } |