Skip to main content
Skip to main content

arrowFlight

Allows reading from and writing to data exposed via an Apache Arrow Flight server.

Syntax

arrowFlight('host:port', 'dataset_name' [, 'username', 'password'])

Arguments

  • host:port — Address of the Arrow Flight server. If the port is omitted, the default port 8815 is used. String.
  • dataset_name — Name of the dataset or descriptor available on the Arrow Flight server. String.
  • username — Username for basic HTTP authentication. String.
  • password — Password for basic HTTP authentication. String.

If username and password are not specified, authentication is not used (this works only if the Arrow Flight server allows unauthenticated access).

The function also supports named collections — see the ArrowFlight table engine for the list of supported parameters.

Returned value

A table object representing the remote dataset. The schema is inferred from the Arrow Flight server.

Settings

  • arrow_flight_request_descriptor_type — Controls how the dataset name is sent to the Flight server. Values: path (default) or command. See the ArrowFlight table engine for details.

Examples

Reading from a remote Arrow Flight server:

SELECT * FROM arrowFlight('127.0.0.1:9005', 'sample_dataset') ORDER BY id;
┌─id─┬─name────┬─value─┐
│  1 │ foo     │ 42.1  │
│  2 │ bar     │ 13.3  │
│  3 │ baz     │ 77.0  │
└────┴─────────┴───────┘

Inserting data into a remote Arrow Flight server:

INSERT INTO FUNCTION arrowFlight('127.0.0.1:9005', 'sample_dataset') VALUES (4, 'qux', 99.9);

Using a named collection:

SELECT * FROM arrowFlight(named_collection_name);

See Also