> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Permite leer y escribir datos expuestos mediante un servidor Apache Arrow Flight.

# arrowFlight

Permite leer y escribir datos expuestos mediante un servidor [Apache Arrow Flight](/es/concepts/features/interfaces/arrowflight).

**Sintaxis**

```sql theme={null}
arrowFlight('host:port', 'dataset_name' [, 'username', 'password'])
```

**Argumentos**

* `host:port` — Dirección del servidor Arrow Flight. Si se omite el puerto, se usa el puerto predeterminado `8815`. [String](/es/reference/data-types/string).
* `dataset_name` — Nombre del conjunto de datos o descriptor disponible en el servidor Arrow Flight. [String](/es/reference/data-types/string).
* `username` — Nombre de usuario para la autenticación HTTP básica. [String](/es/reference/data-types/string).
* `password` — Contraseña para la autenticación HTTP básica. [String](/es/reference/data-types/string).

Si no se especifican `username` y `password`, no se usa autenticación (esto solo funciona si el servidor Arrow Flight permite el acceso sin autenticación).

La función también admite [named collections](/es/concepts/features/configuration/server-config/named-collections); consulta el [motor de tabla ArrowFlight](/es/reference/engines/table-engines/integrations/arrowflight#named-collections) para ver la lista de parámetros compatibles.

**Valor devuelto**

Un objeto de tabla que representa el conjunto de datos remoto. El esquema se infiere a partir del servidor Arrow Flight.

**Configuración**

* `arrow_flight_request_descriptor_type` — Controla cómo se envía el nombre del conjunto de datos al servidor de Flight. Valores: `path` (predeterminado) o `command`. Consulta el [motor de tabla ArrowFlight](/es/reference/engines/table-engines/integrations/arrowflight#settings) para obtener más detalles.

**Ejemplos**

Lectura desde un servidor Arrow Flight remoto:

```sql title="Query" theme={null}
SELECT * FROM arrowFlight('127.0.0.1:9005', 'sample_dataset') ORDER BY id;
```

```text title="Response" theme={null}
┌─id─┬─name────┬─value─┐
│  1 │ foo     │ 42.1  │
│  2 │ bar     │ 13.3  │
│  3 │ baz     │ 77.0  │
└────┴─────────┴───────┘
```

Inserción de datos en un servidor Arrow Flight remoto:

```sql theme={null}
INSERT INTO FUNCTION arrowFlight('127.0.0.1:9005', 'sample_dataset') VALUES (4, 'qux', 99.9);
```

Uso de una named collection:

```sql theme={null}
SELECT * FROM arrowFlight(named_collection_name);
```

**Véase también**

* [Motor de tabla ArrowFlight](/es/reference/engines/table-engines/integrations/arrowflight)
* [Interfaz Arrow Flight](/es/concepts/features/interfaces/arrowflight)
* [Especificación de Apache Arrow Flight SQL](https://arrow.apache.org/docs/format/FlightSql.html)
