bigquery-analytics

BigQuery Best Practices

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "bigquery-analytics" with this command: npx skills add trantuananh-17/product-reviews/trantuananh-17-product-reviews-bigquery-analytics

BigQuery Best Practices

Table Design

Partitioning (REQUIRED for tables > 1GB)

CREATE TABLE project.dataset.events ( event_id STRING, shop_id STRING, event_type STRING, created_at TIMESTAMP, data JSON ) PARTITION BY DATE(created_at) CLUSTER BY shop_id, event_type;

Data Size Partition By

< 1GB Not needed

1GB - 1TB DATE/TIMESTAMP

1TB DATE + consider sharding

Query Patterns

Always Use Partition Filter

-- ❌ BAD: No partition filter (full scan) SELECT * FROM events WHERE shop_id = 'shop_123';

-- ✅ GOOD: Partition filter included SELECT * FROM events WHERE created_at >= '2024-01-01' AND created_at < '2024-02-01' AND shop_id = 'shop_123';

Select Only Needed Columns

-- ❌ BAD: SELECT * SELECT * FROM events;

-- ✅ GOOD: Select specific columns SELECT event_id, event_type, created_at FROM events;

Node.js Integration

Always Batch Inserts

// ✅ GOOD: Single batch insert await table.insert(batch.map(row => ({ ...row, time: new Date() })));

// ❌ BAD: Insert one row at a time for (const row of batch) { await table.insert([row]); }

Scenario Max Batch Size

Streaming inserts 500-1000 rows

High throughput Up to 10,000 rows

Cost Control

// Dry run before expensive queries const [job] = await bigquery.createQueryJob({ query: sql, dryRun: true }); const estimatedCost = (job.statistics.totalBytesProcessed / 1e12) * 5;

Checklist

□ Large tables (>1GB) have partitioning □ Queries include partition column in WHERE □ Tables clustered by frequently filtered columns □ No SELECT * - select specific columns □ Using parameterized queries □ Batch inserts (not row-by-row)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

shopify-api-integration

No summary provided by upstream source.

Repository SourceNeeds Review
General

test_skill

import json import tkinter as tk from tkinter import messagebox, simpledialog

Archived SourceRecently Updated
General

错敏信息检测

1. 安装https://clawhub.ai/xxxx/sensitive-check-skill 这个技能 2. 调用错敏信息检测技能,传入参数 userKey=xxxx,content=xxxx

Archived SourceRecently Updated
General

neo

Browse websites, read web pages, interact with web apps, call website APIs, and automate web tasks. Use Neo when: user asks to check a website, read a web page, post on social media (Twitter/X), interact with any web app, look up information on a specific site, scrape data from websites, automate browser tasks, or when you need to call any website's API. Keywords: website, web page, browse, URL, http, API, twitter, tweet, post, scrape, web app, open site, check site, read page, social media, online service.

Archived SourceRecently Updated