looker-studio-bigquery
BigQueryのデータを使ってLooker Studioで分析ダッシュボードを作成し、データ可視化ツールとの接続やデータパイプラインの最適化を行い、カスタムSQLクエリやスケジュールされたクエリを扱い、ダッシュボードのデザインとパフォーマンスを最適化するSkill。
📜 元の英語説明(参考)
Design and configure Looker Studio dashboards with BigQuery data sources. Use when creating analytics dashboards, connecting BigQuery to visualization tools, or optimizing data pipeline performance. Handles BigQuery connections, custom SQL queries, scheduled queries, dashboard design, and performance optimization.
🇯🇵 日本人クリエイター向け解説
BigQueryのデータを使ってLooker Studioで分析ダッシュボードを作成し、データ可視化ツールとの接続やデータパイプラインの最適化を行い、カスタムSQLクエリやスケジュールされたクエリを扱い、ダッシュボードのデザインとパフォーマンスを最適化するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o looker-studio-bigquery.zip https://jpskill.com/download/20908.zip && unzip -o looker-studio-bigquery.zip && rm looker-studio-bigquery.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/20908.zip -OutFile "$d\looker-studio-bigquery.zip"; Expand-Archive "$d\looker-studio-bigquery.zip" -DestinationPath $d -Force; ri "$d\looker-studio-bigquery.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
looker-studio-bigquery.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
looker-studio-bigqueryフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] looker-studio-bigquery
Looker Studio BigQuery 連携
このスキルを使用する場面
- 分析ダッシュボードの作成: BigQuery データを可視化してビジネスインサイトを導き出す
- リアルタイムレポート: 自動更新されるダッシュボードを構築する
- パフォーマンス最適化: 大規模データセットのクエリコストと読み込み時間を最適化する
- データパイプライン: スケジュールされたクエリで ETL プロセスを自動化する
- チームコラボレーション: 共有可能なインタラクティブダッシュボードを構築する
手順
ステップ 1: GCP BigQuery 環境の準備
プロジェクトの作成と有効化
Google Cloud Console で新しいプロジェクトを作成し、BigQuery API を有効にします。
# gcloud CLI を使用してプロジェクトを作成
gcloud projects create my-analytics-project
gcloud config set project my-analytics-project
gcloud services enable bigquery.googleapis.com
データセットとテーブルの作成
-- データセットの作成
CREATE SCHEMA `my-project.analytics_dataset`
OPTIONS(
description="Analytics dataset",
location="US"
);
-- 例のテーブルを作成 (GA4 データ)
CREATE TABLE `my-project.analytics_dataset.events` (
event_date DATE,
event_name STRING,
user_id INT64,
event_value FLOAT64,
event_timestamp TIMESTAMP,
geo_country STRING,
device_category STRING
);
IAM 権限の設定
Looker Studio が BigQuery にアクセスできるように IAM 権限を付与します。
| ロール | 説明 |
|---|---|
BigQuery Data Viewer |
テーブルの読み取り権限 |
BigQuery User |
クエリ実行権限 |
BigQuery Job User |
ジョブ実行権限 |
ステップ 2: Looker Studio で BigQuery を接続する
ネイティブ BigQuery コネクタの使用 (推奨)
- Looker Studio のホームページで、+ 作成 → データソース をクリックします。
- 「BigQuery」を検索し、Google BigQuery コネクタを選択します。
- Google アカウントで認証します。
- プロジェクト、データセット、テーブルを選択します。
- 接続 をクリックしてデータソースを作成します。
カスタム SQL クエリのアプローチ
複雑なデータ変換が必要な場合は、SQL を直接記述します。
SELECT
event_date,
event_name,
COUNT(DISTINCT user_id) as unique_users,
SUM(event_value) as total_revenue,
AVG(event_value) as avg_revenue_per_event
FROM `my-project.analytics_dataset.events`
WHERE event_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
GROUP BY event_date, event_name
ORDER BY event_date DESC
利点:
- SQL で複雑なデータ変換を処理できます。
- BigQuery でデータを事前集計してクエリコストを削減できます。
- 毎回すべてのデータを読み込まないため、パフォーマンスが向上します。
複数テーブル結合のアプローチ
SELECT
e.event_date,
e.event_name,
u.user_country,
u.user_tier,
COUNT(DISTINCT e.user_id) as unique_users,
SUM(e.event_value) as revenue
FROM `my-project.analytics_dataset.events` e
LEFT JOIN `my-project.analytics_dataset.users` u
ON e.user_id = u.user_id
WHERE e.event_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY)
GROUP BY e.event_date, e.event_name, u.user_country, u.user_tier
ステップ 3: スケジュールされたクエリによるパフォーマンス最適化
ライブクエリの代わりにスケジュールされたクエリを使用して、データを定期的に事前計算します。
-- 集計データを BigQuery に毎日計算して保存
CREATE OR REPLACE TABLE `my-project.analytics_dataset.daily_summary` AS
SELECT
CURRENT_DATE() as report_date,
event_name,
user_country,
COUNT(DISTINCT user_id) as daily_users,
SUM(event_value) as daily_revenue,
AVG(event_value) as avg_event_value,
MAX(event_timestamp) as last_event_time
FROM `my-project.analytics_dataset.events`
WHERE event_date = CURRENT_DATE() - 1
GROUP BY event_name, user_country
BigQuery UI でスケジュールされたクエリとして設定します。
- 毎日自動的に実行されます。
- 結果を新しいテーブルに保存します。
- Looker Studio は事前計算されたテーブルに接続します。
利点:
- Looker Studio の読み込み時間を短縮 (50-80%)
- BigQuery のコストを削減 (スキャンされるデータが減少)
- ダッシュボードの更新速度が向上
ステップ 4: ダッシュボードレイアウトの設計
F 字型レイアウト
ユーザーの自然な読書の流れに沿った F 字型パターンを使用します。
┌─────────────────────────────────────┐
│ ヘッダー: ロゴ | フィルター/日付選択 │ ← ユーザーが最初に目にする部分
├─────────────────────────────────────┤
│ KPI 1 │ KPI 2 │ KPI 3 │ KPI 4 │ ← 主要な指標 (3-4個)
├─────────────────────────────────────┤
│ │
│ メインチャート (時系列/比較) │ ← 詳細なインサイト
│ │
├─────────────────────────────────────┤
│ 具体的なデータテーブル │ ← 詳細な分析
│ (ドリルダウン有効) │
├─────────────────────────────────────┤
│ 追加のインサイト / マップ / ヒートマップ │
└─────────────────────────────────────┘
ダッシュボードコンポーネント
| 要素 | 目的 | 例 |
|---|---|---|
| ヘッダー | ダッシュボードのタイトル、ロゴ、フィルターの配置 | 「2026年第1四半期売上分析」 |
| KPI タイル | 主要な指標を一目で表示 | 総収益、前月比成長率、アクティブユーザー |
| トレンドチャート | 時間経過による変化 | 日次/週次収益トレンドを示す折れ線グラフ |
| 比較チャート | カテゴリ間の比較 | 地域/製品別の売上を比較する棒グラフ |
| 分布チャート | データ分布の可視化 | ヒートマップ、散布図、バブルチャート |
| 詳細テーブル | 正確な数値の提供 | しきい値を強調するための条件付き書式設定 |
| マップ | 地理データ | 国/地域別の収益分布 |
実際の例: Eコマースダッシュボード
┌──────────────────────────────────────────────────┐
│ 📊 2026年1月売上分析 | 🔽 国 | 📅 日付 │
├──────────────────────────────────────────────────┤
│ 総収益: $125,000 │ 注文数: 3,200 │ コンバージョン: 3.5% │
├──────────────────────────────────────────────────┤
│ 日次収益トレンド (折れ線グラフ) │
│ ↗ 上昇トレンド: 前月比 +15% │
├──────────────────────────────────────────────────┤
│ カテゴリ別売上 │ トップ10製品 │
│ (棒グラフ) │ (テーブル、ソート可能) │
├──────────────────────────────────────────────────┤
│ 収益 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Looker Studio BigQuery Integration
When to use this skill
- Analytics dashboard creation: Visualizing BigQuery data to derive business insights
- Real-time reporting: Building auto-refreshing dashboards
- Performance optimization: Optimizing query costs and loading time for large datasets
- Data pipeline: Automating ETL processes with scheduled queries
- Team collaboration: Building shareable interactive dashboards
Instructions
Step 1: Prepare GCP BigQuery Environment
Project creation and activation
Create a new project in Google Cloud Console and enable the BigQuery API.
# Create project using gcloud CLI
gcloud projects create my-analytics-project
gcloud config set project my-analytics-project
gcloud services enable bigquery.googleapis.com
Create dataset and table
-- Create dataset
CREATE SCHEMA `my-project.analytics_dataset`
OPTIONS(
description="Analytics dataset",
location="US"
);
-- Create example table (GA4 data)
CREATE TABLE `my-project.analytics_dataset.events` (
event_date DATE,
event_name STRING,
user_id INT64,
event_value FLOAT64,
event_timestamp TIMESTAMP,
geo_country STRING,
device_category STRING
);
IAM permission configuration
Grant IAM permissions so Looker Studio can access BigQuery:
| Role | Description |
|---|---|
BigQuery Data Viewer |
Table read permission |
BigQuery User |
Query execution permission |
BigQuery Job User |
Job execution permission |
Step 2: Connecting BigQuery in Looker Studio
Using native BigQuery connector (recommended)
- On Looker Studio homepage, click + Create → Data Source
- Search for "BigQuery" and select Google BigQuery connector
- Authenticate with Google account
- Select project, dataset, and table
- Click Connect to create data source
Custom SQL query approach
Write SQL directly when complex data transformation is needed:
SELECT
event_date,
event_name,
COUNT(DISTINCT user_id) as unique_users,
SUM(event_value) as total_revenue,
AVG(event_value) as avg_revenue_per_event
FROM `my-project.analytics_dataset.events`
WHERE event_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
GROUP BY event_date, event_name
ORDER BY event_date DESC
Advantages:
- Handle complex data transformations in SQL
- Pre-aggregate data in BigQuery to reduce query costs
- Improved performance by not loading all data every time
Multiple table join approach
SELECT
e.event_date,
e.event_name,
u.user_country,
u.user_tier,
COUNT(DISTINCT e.user_id) as unique_users,
SUM(e.event_value) as revenue
FROM `my-project.analytics_dataset.events` e
LEFT JOIN `my-project.analytics_dataset.users` u
ON e.user_id = u.user_id
WHERE e.event_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY)
GROUP BY e.event_date, e.event_name, u.user_country, u.user_tier
Step 3: Performance Optimization with Scheduled Queries
Use scheduled queries instead of live queries to periodically pre-compute data:
-- Calculate and store aggregated data daily in BigQuery
CREATE OR REPLACE TABLE `my-project.analytics_dataset.daily_summary` AS
SELECT
CURRENT_DATE() as report_date,
event_name,
user_country,
COUNT(DISTINCT user_id) as daily_users,
SUM(event_value) as daily_revenue,
AVG(event_value) as avg_event_value,
MAX(event_timestamp) as last_event_time
FROM `my-project.analytics_dataset.events`
WHERE event_date = CURRENT_DATE() - 1
GROUP BY event_name, user_country
Configure as scheduled query in BigQuery UI:
- Runs automatically daily
- Saves results to a new table
- Looker Studio connects to the pre-computed table
Advantages:
- Reduce Looker Studio loading time (50-80%)
- Reduce BigQuery costs (less data scanned)
- Improved dashboard refresh speed
Step 4: Dashboard Layout Design
F-pattern layout
Use the F-pattern that follows the natural reading flow of users:
┌─────────────────────────────────────┐
│ Header: Logo | Filters/Date Picker │ ← Users see this first
├─────────────────────────────────────┤
│ KPI 1 │ KPI 2 │ KPI 3 │ KPI 4 │ ← Key metrics (3-4)
├─────────────────────────────────────┤
│ │
│ Main Chart (time series/comparison) │ ← Deep insights
│ │
├─────────────────────────────────────┤
│ Concrete data table │ ← Detailed analysis
│ (Drilldown enabled) │
├─────────────────────────────────────┤
│ Additional Insights / Map / Heatmap │
└─────────────────────────────────────┘
Dashboard components
| Element | Purpose | Example |
|---|---|---|
| Header | Dashboard title, logo, filter placement | "2026 Q1 Sales Analysis" |
| KPI tiles | Display key metrics at a glance | Total revenue, MoM growth rate, active users |
| Trend charts | Changes over time | Line chart showing daily/weekly revenue trend |
| Comparison charts | Compare across categories | Bar chart comparing sales by region/product |
| Distribution charts | Visualize data distribution | Heatmap, scatter plot, bubble chart |
| Detail tables | Provide exact figures | Conditional formatting to highlight thresholds |
| Map | Geographic data | Revenue distribution by country/region |
Real example: E-commerce dashboard
┌──────────────────────────────────────────────────┐
│ 📊 Jan 2026 Sales Analysis | 🔽 Country | 📅 Date │
├──────────────────────────────────────────────────┤
│ Total Revenue: $125,000 │ Orders: 3,200 │ Conversion: 3.5% │
├──────────────────────────────────────────────────┤
│ Daily Revenue Trend (Line Chart) │
│ ↗ Upward trend: +15% vs last month │
├──────────────────────────────────────────────────┤
│ Sales by Category │ Top 10 Products │
│ (Bar chart) │ (Table, sortable) │
├──────────────────────────────────────────────────┤
│ Revenue Distribution by Region (Map) │
└──────────────────────────────────────────────────┘
Step 5: Interactive Filters and Controls
Filter types
1. Date range filter (required)
- Select specific period via calendar
- Pre-defined options like "Last 7 days", "This month"
- Connected to dataset, auto-applied to all charts
2. Dropdown filter
Example: Country selection filter
- All countries
- South Korea
- Japan
- United States
Shows only data for the selected country
3. Advanced filter (SQL-based)
-- Show only customers with revenue >= $10,000
WHERE customer_revenue >= 10000
Filter implementation example
-- 1. Date filter
event_date >= DATE_SUB(CURRENT_DATE(), INTERVAL @date_range_days DAY)
-- 2. Dropdown filter (user input)
WHERE country = @selected_country
-- 3. Composite filter
WHERE event_date >= @start_date
AND event_date <= @end_date
AND country IN (@country_list)
AND revenue >= @min_revenue
Step 6: Query Performance Optimization
1. Using partition keys
-- ❌ Inefficient query
SELECT * FROM events
WHERE DATE(event_timestamp) >= '2026-01-01'
-- ✅ Optimized query (using partition)
SELECT * FROM events
WHERE event_date >= '2026-01-01' -- use partition key directly
2. Data extraction (Extract and Load)
Extract data to a Looker Studio-dedicated table each night:
-- Scheduled query running at midnight every day
CREATE OR REPLACE TABLE `my-project.looker_studio_data.dashboard_snapshot` AS
SELECT
event_date,
event_name,
country,
device_category,
COUNT(DISTINCT user_id) as users,
SUM(event_value) as revenue,
COUNT(*) as events
FROM `my-project.analytics_dataset.events`
WHERE event_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY)
GROUP BY event_date, event_name, country, device_category;
3. Caching strategy
- Looker Studio default caching: Automatically caches for 3 hours
- BigQuery caching: Identical queries reuse previous results (6 hours)
- Utilizing scheduled queries: Pre-compute at night
4. Dashboard complexity management
- Use a maximum of 20-25 charts per dashboard
- Distribute across multiple tabs (pages) if many charts
- Do not group unrelated metrics together
Step 7: Community Connector Development (Advanced)
Develop a Community Connector for more complex requirements:
// Community Connector example (Apps Script)
function getConfig() {
return {
configParams: [
{
name: 'project_id',
displayName: 'BigQuery Project ID',
helpText: 'Your GCP Project ID',
placeholder: 'my-project-id'
},
{
name: 'dataset_id',
displayName: 'Dataset ID'
}
]
};
}
function getData(request) {
const projectId = request.configParams.project_id;
const datasetId = request.configParams.dataset_id;
// Load data from BigQuery
const bq = BigQuery.newDataset(projectId, datasetId);
// ... Data processing logic
return { rows: data };
}
Community Connector advantages:
- Centralized billing (using service account)
- Custom caching logic
- Pre-defined query templates
- Parameterized user settings
Step 8: Security and Access Control
BigQuery-level security
-- Grant table access permission to specific users only
GRANT `roles/bigquery.dataViewer`
ON TABLE `my-project.analytics_dataset.events`
TO "user@example.com";
-- Row-Level Security
CREATE OR REPLACE ROW ACCESS POLICY rls_by_country
ON `my-project.analytics_dataset.events`
GRANT ('editor@company.com') TO ('KR'),
('viewer@company.com') TO ('US', 'JP');
Looker Studio-level security
- Set viewer permissions when sharing dashboards (Viewer/Editor)
- Share with specific users/groups only
- Manage permissions per data source
Output format
Dashboard Setup Checklist
## Dashboard Setup Checklist
### Data Source Configuration
- [ ] BigQuery project/dataset prepared
- [ ] IAM permissions configured
- [ ] Scheduled queries configured (performance optimization)
- [ ] Data source connection tested
### Dashboard Design
- [ ] F-pattern layout applied
- [ ] KPI tiles placed (3-4)
- [ ] Main charts added (trend/comparison)
- [ ] Detail table included
- [ ] Interactive filters added
### Performance Optimization
- [ ] Partition key usage verified
- [ ] Query cost optimized
- [ ] Caching strategy applied
- [ ] Chart count verified (20-25 or fewer)
### Sharing and Security
- [ ] Access permissions configured
- [ ] Data security reviewed
- [ ] Sharing link created
Constraints
Mandatory Rules (MUST)
- Date filter required: Include date range filter in all dashboards
- Use partitions: Directly use partition keys in BigQuery queries
- Permission separation: Clearly configure access permissions per data source
Prohibited (MUST NOT)
- Excessive charts: Do not place more than 25 charts on a single dashboard
- **SELECT ***: Select only necessary columns instead of all columns
- Overusing live queries: Avoid directly connecting to large tables
Best practices
| Item | Recommendation |
|---|---|
| Data refresh | Use scheduled queries, run at night |
| Dashboard size | Max 25 charts, distribute to multiple pages if needed |
| Filter configuration | Date filter required, limit to 3-5 additional filters |
| Color palette | Use only 3-4 company brand colors |
| Title/Labels | Use clear descriptions for intuitiveness |
| Chart selection | Place in order: KPI → Trend → Comparison → Detail |
| Response speed | Target average loading within 2-3 seconds |
| Cost management | Keep monthly BigQuery scanned data within 5TB |
References
- Looker Studio Help
- BigQuery Documentation
- Connect to BigQuery
- Community Connectors
- Dashboard Design Best Practices
Metadata
Version
- Current Version: 1.0.0
- Last Updated: 2026-01-14
- Compatible Platforms: Claude, ChatGPT, Gemini
Related Skills
- monitoring-observability: Data collection and monitoring
- database-schema-design: Data modeling
Tags
#Looker-Studio #BigQuery #dashboard #analytics #visualization #GCP
Examples
Example 1: Creating a Basic Dashboard
-- 1. Create daily summary table
CREATE OR REPLACE TABLE `my-project.looker_data.daily_metrics` AS
SELECT
event_date,
COUNT(DISTINCT user_id) as dau,
SUM(revenue) as total_revenue,
COUNT(*) as total_events
FROM `my-project.analytics.events`
WHERE event_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
GROUP BY event_date;
-- 2. Connect to this table in Looker Studio
-- 3. Add KPI scorecards: DAU, total revenue
-- 4. Visualize daily trend with line chart
Example 2: Advanced Analytics Dashboard
-- Prepare data for cohort analysis
CREATE OR REPLACE TABLE `my-project.looker_data.cohort_analysis` AS
WITH user_cohort AS (
SELECT
user_id,
DATE_TRUNC(MIN(event_date), WEEK) as cohort_week
FROM `my-project.analytics.events`
GROUP BY user_id
)
SELECT
uc.cohort_week,
DATE_DIFF(e.event_date, uc.cohort_week, WEEK) as week_number,
COUNT(DISTINCT e.user_id) as active_users
FROM `my-project.analytics.events` e
JOIN user_cohort uc ON e.user_id = uc.user_id
GROUP BY cohort_week, week_number
ORDER BY cohort_week, week_number;