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

> 允许对通过 Apache Arrow Flight 服务器提供的数据执行查询。

# arrowFlight

允许对由 [Apache Arrow Flight](/zh/concepts/features/interfaces/arrowflight) 服务器提供的数据执行查询。

**语法**

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

**参数**

* `host:port` — Arrow Flight 服务器的地址。[String](/zh/reference/data-types/string)。
* `dataset_name` — Arrow Flight 服务器上可用的数据集或描述符名称。[String](/zh/reference/data-types/string)。
* `username` - 用于基本 HTTP 风格身份验证的用户名。
* `password` - 用于基本 HTTP 风格身份验证的密码。
  如果未指定 `username` 和 `password`，则表示不使用身份验证
  (这仅在 Arrow Flight 服务器允许时才有效) 。

**返回值**

* 表示远程数据集的表对象。schema 根据 Arrow Flight 的响应推断。

**示例**

```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  │
└────┴─────────┴───────┘
```

**另请参见**

* [Arrow Flight](/zh/reference/engines/table-engines/integrations/arrowflight) 表引擎
* [Apache Arrow Flight SQL](https://arrow.apache.org/docs/format/FlightSql.html)
