---
title: Apache Arrow Flight RPC clients
description: Flight clients are language-specific drivers that can interact with Flight servers using the Arrow in-memory format and the Flight RPC framework. View the list of available clients.
url: https://docs.influxdata.com/influxdb3/clustered/reference/client-libraries/flight/
estimated_tokens: 3749
product: InfluxDB Clustered
version: clustered
---

# Apache Arrow Flight RPC clients

Flight RPC and Flight SQL clients are language-specific drivers that interact with databases using the Arrow in-memory format and the Flight RPC protocol. Apache Arrow Flight RPC and Flight SQL protocols define APIs for servers and clients.

#### Use InfluxDB 3 client libraries

We recommend using [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) for integrating InfluxDB 3 with your application code. Client libraries wrap Apache Arrow Flight clients and provide convenient methods for [writing](/influxdb3/clustered/get-started/write/#write-line-protocol-to-influxdb), [querying](/influxdb3/clustered/get-started/query/#execute-an-sql-query), and processing data stored in InfluxDB Clustered.

**Flight RPC clients** can use SQL or InfluxQL to query data stored in an InfluxDB Clustered database. Using InfluxDB 3’s IOx-specific Flight RPC protocol, clients send a single `DoGet()` request to authenticate, query, and retrieve data.

**Flight SQL clients** use the [Flight SQL protocol](https://arrow.apache.org/docs/format/FlightSql.html) for querying an SQL database server. They can use SQL to query data stored in an InfluxDB Clustered database, but they can’t use InfuxQL.

Clients are maintained by Apache Arrow projects or third-parties. For specifics about a Flight client, see the client’s GitHub repository.

### [C# .NET Flight client](/influxdb3/clustered/reference/client-libraries/flight/csharp-flight/)

The C# .NET Flight client integrates with C# .NET scripts and applications to query data stored in InfluxDB.

### [Go Flight client](/influxdb3/clustered/reference/client-libraries/flight/go-flight/)

The Go Flight client integrates with Go scripts and applications to query data stored in InfluxDB.

### [Java Flight SQL package](/influxdb3/clustered/reference/client-libraries/flight/java-flightsql/)

The Java Flight SQL client integrates with Java applications to query and retrieve data from Flight database servers using RPC and SQL.

```java
public class Query {
    public static void main(String[] args) {       
        String query = "SELECT * FROM home";
        Location location = Location.forGrpcTls(HOST, 443);

        CredentialCallOption auth = new CredentialCallOption(new BearerCredentialWriter(TOKEN));
        BufferAllocator allocator = new RootAllocator(Long.MAX_VALUE);

        FlightClientMiddleware.Factory f = info -> new FlightClientMiddleware() {
            @Override
            public void onBeforeSendingHeaders(CallHeaders outgoingHeaders) {
                outgoingHeaders.insert(DATABASE_FIELD, DATABASE_NAME);
            }
        };

        FlightClient client = FlightClient.builder(allocator, location)
                .intercept(f)
                .build();
        FlightSqlClient sqlClient = new FlightSqlClient(client);
        FlightInfo flightInfo = sqlClient.execute(query, auth);
    }
}
```

### [Python Flight client](/influxdb3/clustered/reference/client-libraries/flight/python-flight/)

The Python Flight client integrates with Python scripts and applications to query data stored in InfluxDB.

```py
from pyarrow.flight import FlightClient, Ticket, FlightCallOptions 
import json
import pandas
import tabulate

# Downsampling query groups data into 2-hour bins
sql="""
  SELECT DATE_BIN(INTERVAL '2 hours',
      time,
      '1970-01-01T00:00:00Z') AS time,
    room,
    selector_max(temp, time)['value'] AS 'max temp',
    selector_min(temp, time)['value'] AS 'min temp',
    avg(temp) AS 'average temp'
  FROM home
  GROUP BY
    1,
    room
  ORDER BY room, 1"""
  
flight_ticket = Ticket(json.dumps({
  "namespace_name": "DATABASE_NAME",
  "sql_query": sql,
  "query_type": "sql"
}))

token = (b"authorization", bytes(f"Bearer DATABASE_TOKEN".encode('utf-8')))
options = FlightCallOptions(headers=[token])
client = FlightClient(f"grpc+tls://cluster-host.com:443")

reader = client.do_get(flight_ticket, options)
arrow_table = reader.read_all()
```

### [Python Flight SQL DBAPI client](/influxdb3/clustered/reference/client-libraries/flight/python-flightsql-dbapi/)

The Python `flightsql-dbapi` library uses SQL and the Flight SQL protocol to query data stored in an InfluxDB Clustered database.

[client libraries](/influxdb3/clustered/tags/client-libraries/) [Flight RPC](/influxdb3/clustered/tags/flight-rpc/) [Flight SQL](/influxdb3/clustered/tags/flight-sql/)
