---
name: bq_list_routines
kind: function
lang: py
domain: infra
version: "1.0.0"
purity: impure
signature: "def bq_list_routines(client: BQClient, dataset_id: str) -> list[dict]"
description: "Lista routines de un dataset incluyendo tipo y lenguaje."
tags: [bigquery, gcp, routine, udf, list, google-cloud, python, pendiente-usar]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: "error_go_core"
imports: [google-cloud-bigquery]
params:
  - name: client
    desc: "instancia autenticada de BQClient"
  - name: dataset_id
    desc: "nombre del dataset cuyas routines se quieren listar"
output: "lista de dicts con routine_id, dataset_id, project, routine_type y language para cada routine del dataset"
tested: false
tests: []
test_file_path: ""
file_path: "python/functions/bigquery/routines.py"
---

## Ejemplo

```python
from bigquery.client import bq_auth
from bigquery.routines import bq_list_routines

client = bq_auth("my-project")
routines = bq_list_routines(client, "analytics")

for r in routines:
    print(r["routine_id"], r["routine_type"], r["language"])
# double_value SCALAR_FUNCTION SQL
# refresh_summary PROCEDURE SQL
# parse_json SCALAR_FUNCTION JAVASCRIPT
```

## Notas

Retorna lista vacia si el dataset no tiene routines. Lanza `google.api_core.exceptions.NotFound` si el dataset no existe.

El listado solo incluye metadata basica (routine_id, tipo, lenguaje). Para obtener el cuerpo y argumentos completos de una routine especifica, usar `client._client.get_routine(f"{project}.{dataset}.{routine_id}")`.
