---
name: bq_delete_routine
kind: function
lang: py
domain: infra
version: "1.0.0"
purity: impure
signature: "def bq_delete_routine(client: BQClient, dataset_id: str, routine_id: str) -> None"
description: "Elimina una routine de un dataset."
tags: [bigquery, gcp, routine, udf, delete, google-cloud, python]
uses_functions: []
uses_types: []
returns: []
returns_optional: true
error_type: "error_go_core"
imports: [google-cloud-bigquery]
params:
  - name: client
    desc: "instancia autenticada de BQClient"
  - name: dataset_id
    desc: "nombre del dataset que contiene la routine"
  - name: routine_id
    desc: "nombre/identificador de la routine a eliminar"
output: "None; lanza NotFound si la routine no existe"
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_delete_routine

client = bq_auth("my-project")
bq_delete_routine(client, "analytics", "double_value")
# La routine queda eliminada permanentemente
```

## Notas

Lanza `google.api_core.exceptions.NotFound` (404) si la routine no existe. La operacion es permanente e irreversible.

Para eliminar y recrear una routine actualizada, combinar con `bq_create_routine`:

```python
bq_delete_routine(client, "analytics", "double_value")
bq_create_routine(client, "analytics", "double_value", body="x * 3", ...)
```
