# Database and Analytics Skills in the Google Skills Repository: Complete Guide

> Explore the google skills repository for database and analytics skills. Discover production-ready agents for managed database operations and GA4 administration with code samples.

- Repository: [Google/skills](https://github.com/google/skills)
- Tags: complete-guide
- Published: 2026-09-05

---

**The Google Skills repository provides eight production-ready skills spanning managed database lifecycle operations and Google Analytics 4 (GA4) programmatic administration, each implemented as self-contained prompt-driven agents with executable code samples.**

The Google Skills repository hosts a curated collection of automation skills designed for Google Cloud Platform. These **database and analytics skills** enable developers to provision Cloud Spanner instances, optimize Bigtable schemas, query GA4 event data, and manage analytics properties through dedicated [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) documentation and reference implementations.

## Database Skills

The repository contains six distinct database skills covering relational, NoSQL, and data warehouse services. Each skill resides in its own directory under `skills/cloud/` and includes infrastructure-as-code templates, CLI examples, and client library snippets.

### Cloud Spanner Basics

Located at [`skills/cloud/spanner-basics/SKILL.md`](https://github.com/google/skills/blob/main/skills/cloud/spanner-basics/SKILL.md), this skill handles global-scale relational database provisioning and schema design. It automates instance creation with node configuration, primary key optimization, and secondary index management across Go, Java, Node.js, and Python client libraries.

To provision a Spanner instance via the command line:

```bash

# Create an instance

gcloud spanner instances create my-instance \
  --config=regional-us-central1 \
  --description="Demo instance" \
  --nodes=1

# Create a database

gcloud spanner databases create my-database \
  --instance=my-instance

```

### Cloud SQL Basics

The skill at [`skills/cloud/cloud-sql-basics/SKILL.md`](https://github.com/google/skills/blob/main/skills/cloud/cloud-sql-basics/SKILL.md) manages MySQL, PostgreSQL, and SQL Server instances. Core capabilities include automated provisioning via `gcloud sql instances create`, Private Service Connect configuration, and IAM-based authentication for passwordless database access.

Programmatic instance creation uses the `sql_v1` client:

```python
from google.cloud import sql_v1

client = sql_v1.SqlInstancesServiceClient()
instance = sql_v1.Instance(
    name="my-pg-instance",
    database_version=sql_v1.SqlDatabaseVersion.POSTGRES_18,
    settings=sql_v1.Settings(
        tier="db-custom-2-3840",
        ip_configuration=sql_v1.IpConfiguration(
            ipv4_enabled=False,
            private_network="projects/PROJECT_ID/global/networks/default",
        ),
    ),
)
operation = client.insert(project="PROJECT_ID", body=instance)
operation.result()  # Wait for completion

```

### Cloud Databases Onboarding

This recommendation engine at [`skills/cloud/cloud-databases-onboarding/SKILL.md`](https://github.com/google/skills/blob/main/skills/cloud/cloud-databases-onboarding/SKILL.md) analyzes workload requirements—throughput, latency, and transactionality—to suggest optimal database selections. It employs a matrix-driven decision tree (OLTP workloads route to Spanner, analytical workloads to BigQuery) and automates provisioning of the chosen service.

Invoke the recommendation logic via API:

```bash
curl -X POST https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "contents":[{"role":"user","parts":[{"text":"I need a low‑latency transactional store for 10 M reads/sec"}]}]
      }'

```

### Cloud Bigtable Basics

The [`skills/cloud/bigtable-basics/SKILL.md`](https://github.com/google/skills/blob/main/skills/cloud/bigtable-basics/SKILL.md) skill specializes in high-throughput NoSQL workloads. It provides guidance for wide-column table design (column families and timestamp granularity), cluster provisioning via `gcloud bigtable instances create`, and access patterns using HBase-compatible client libraries.

### BigQuery Basics

Located at [`skills/cloud/bigquery-basics/SKILL.md`](https://github.com/google/skills/blob/main/skills/cloud/bigquery-basics/SKILL.md), this skill treats BigQuery as both analytics engine and data warehouse. It supports the `bq` CLI for dataset and table management, Standard SQL querying, and fine-grained IAM permission controls.

### Data Lineage Visualization

The skill at [`skills/cloud/datalineage-summary/SKILL.md`](https://github.com/google/skills/blob/main/skills/cloud/datalineage-summary/SKILL.md) traces data movement across heterogeneous databases (Spanner, Cloud SQL, BigQuery). It extracts DDL via MCP (Model Context Protocol), generates lineage graphs, and exports visualizations to GraphViz or Mermaid format for compliance documentation.

## Analytics Skills

The analytics category provides two complementary skills for Google Analytics 4 (GA4) automation, supporting read-only reporting and administrative configuration across six programming languages.

### Google Analytics Data API Basics

The skill at [`skills/analytics/google-analytics-data-api-basics/SKILL.md`](https://github.com/google/skills/blob/main/skills/analytics/google-analytics-data-api-basics/SKILL.md) enables event-level data extraction and audience reporting. It supports the `data_v1beta` client libraries for Python, Java, Go, Node.js, .NET, and PHP.

Query GA4 event data programmatically:

```python
from google.analytics import data_v1beta
client = data_v1beta.AlphaAnalyticsDataClient()

request = data_v1beta.RunReportRequest(
    property="properties/123456789",
    dimensions=[data_v1beta.Dimension(name="eventName")],
    metrics=[data_v1beta.Metric(name="eventCount")],
    date_ranges=[data_v1beta.DateRange(start_date="2024-01-01", end_date="today")]
)

response = client.run_report(request)
for row in response.rows:
    print(row.dimension_values[0].value, row.metric_values[0].value)

```

### Google Analytics Admin API Basics

Located at [`skills/analytics/google-analytics-admin-api-basics/SKILL.md`](https://github.com/google/skills/blob/main/skills/analytics/google-analytics-admin-api-basics/SKILL.md), this skill manages GA4 property lifecycle and configuration. It handles property creation, data stream configuration (Web, iOS, Android), and IAM access control through the `AnalyticsAdminServiceClient`.

Create a new property using Node.js:

```javascript
const {AnalyticsAdminServiceClient} = require('@google-analytics/admin');
const client = new AnalyticsAdminServiceClient();

async function createProperty() {
  const [property] = await client.createProperty({
    property: {
      displayName: 'My New Property',
      industryCategory: 'TECHNOLOGY',
      timeZone: 'America/Los_Angeles',
    },
  });
  console.log(`Created property ${property.name}`);
}
createProperty();

```

List existing data streams via REST:

```bash
curl -X GET \
  "https://analyticsadmin.googleapis.com/v1alpha/properties/123456789/dataStreams" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

```

## Summary

- **Six database skills** cover the complete lifecycle of Google Cloud data stores: relational (Cloud SQL), globally distributed SQL (Spanner), wide-column NoSQL (Bigtable), data warehouse (BigQuery), intelligent selection (Cloud Databases Onboarding), and compliance tracking (Data Lineage).
- **Two analytics skills** provide full-spectrum GA4 automation: the Data API skill for event reporting and the Admin API skill for property and data stream management.
- **Multi-language support** spans Python, Java, Go, Node.js, .NET, and PHP, with each skill directory containing reference implementations and infrastructure-as-code templates.
- **Self-documented architecture** places implementation details in [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) files with safety instructions, prompt engineering patterns, and executable examples for CLI, Terraform, and client libraries.

## Frequently Asked Questions

### What database and analytics skills are available in the Google Skills repository?

The repository provides eight skills total: six database skills (Spanner Basics, Cloud SQL Basics, Cloud Databases Onboarding, Bigtable Basics, BigQuery Basics, and Data Lineage) and two analytics skills (Google Analytics Data API Basics and Google Analytics Admin API Basics). Each skill operates as a standalone agent with dedicated documentation in its respective [`SKILL.md`](https://github.com/google/skills/blob/main/SKILL.md) file.

### How does the Cloud Databases Onboarding skill recommend the right database?

The skill implements a requirement-discovery workflow that evaluates workload characteristics including read/write throughput, latency requirements, and transactionality needs. It applies a matrix-driven recommendation engine that maps OLTP requirements to Spanner, analytical workloads to BigQuery, and cache-heavy patterns to Bigtable, then automates the provisioning of the selected service.

### Which programming languages are supported by the Google Analytics skills?

Both the Data API and Admin API skills provide reference implementations for six languages: Python, Java, Go, Node.js, .NET, and PHP. The source code for these implementations resides in the `references` subdirectory of each analytics skill folder, containing idiomatic client library usage for the `data_v1beta` and `v1alpha` API versions respectively.

### How does the Data Lineage skill track data movement across databases?

The skill extracts DDL metadata via MCP (Model Context Protocol) from source systems including Spanner, Cloud SQL, and BigQuery. It traces table-level dependencies and transformation logic, then generates visualization graphs exportable to GraphViz DOT format or Mermaid syntax for documentation in CI/CD pipelines or compliance audits.