Files
egutierrez 47fac22230 chore: auto-commit (799 archivos)
- .claude/CLAUDE.md
- .claude/commands/subagentes.md
- .claude/rules/INDEX.md
- .mcp.json
- bash/functions/cybersecurity/analyze_dns.md
- bash/functions/cybersecurity/audit_http_headers.md
- bash/functions/cybersecurity/audit_ssh_config.md
- bash/functions/cybersecurity/check_firewall.md
- bash/functions/cybersecurity/detect_suspicious_users.md
- bash/functions/cybersecurity/encrypt_file.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 00:28:20 +02:00

2.1 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports params output tested tests test_file_path file_path
bq_create_dataset function py infra 1.0.0 impure def bq_create_dataset(client: BQClient, dataset_id: str, location: str = 'US', description: str = '', labels: dict[str, str] | None = None, default_table_expiration_ms: int = 0) -> dict Crea un dataset en Google BigQuery con ubicacion, descripcion y labels. Usa client._client.create_dataset() del SDK oficial.
bigquery
gcp
dataset
create
google-cloud
python
pendiente-usar
false error_go_core
google-cloud-bigquery
name desc
client instancia autenticada de BQClient
name desc
dataset_id nombre del dataset dentro del proyecto (sin prefijo de proyecto)
name desc
location ubicacion geografica del dataset: US, EU, us-central1, europe-west1, etc.
name desc
description descripcion opcional del dataset
name desc
labels dict de labels key-value para categorizar el dataset
name desc
default_table_expiration_ms tiempo de expiracion por defecto para tablas en milisegundos; 0 = sin expiracion
dict con dataset_id, project, full_id, location, description, labels, created, modified, default_table_expiration_ms false
python/functions/bigquery/datasets.py

Ejemplo

from bigquery.client import bq_auth
from bigquery.datasets import bq_create_dataset

client = bq_auth("my-project")
ds = bq_create_dataset(
    client,
    "analytics",
    location="EU",
    description="Data warehouse principal",
    labels={"env": "prod", "team": "data"},
)
print(ds["full_id"], ds["location"])
# my-project.analytics EU

Notas

Lanza google.api_core.exceptions.Conflict (409) si el dataset ya existe. El full_id tiene formato {project}.{dataset_id} y puede usarse directamente como referencia en otras llamadas al SDK. default_table_expiration_ms aplica a todas las tablas nuevas del dataset; las tablas existentes no se ven afectadas.