Apache Arrow Flight API
Query web3 data with SQL via the Apache Arrow Flight API
SQL query results are now available as Apache Arrow data frames via a high-performance Apache Arrow Flight endpoint.
Arrow Flight is a data protocol built on the high-performance, open-source gRPC protocol.
This enables high-speed access to your data in Python, Go, C++, C#, and Rust, and makes it easy to use libraries like Pandas and NumPy.
We recommend using our SDKs to connect and query this endpoint. SDKs are available for Python, Node.js, and Go with more coming soon. In Python, the query results from the SDK can be easily converted to Pandas or NumPy format.
You may also use Apache's pyarrow
library directly.
Note on Apple M1 Macs - How do I know if I have an M1?
The spicepy/pyarrow
installation requires miniforge.
See the Python SDK page for installation steps.
Connecting to the endpoint
Use the gRPC + TLS URL:
grpc+tls://flight.spiceai.io
For Firecache use the gRPC + TLS URL:
grpc+tls://firecache.spiceai.io
For documentation on the Spice Firecache see
Use basic authentication
Username can be set to an empty string
Password should be set to the API key of your app
Requirements
Table names must be fully-qualified. For example
eth.blocks
Samples
Find code samples in Python in Arrow Flight Samples.
Troubleshooting
Mac/Windows Certificate issue
If you get this error:
Could not get default pem root certs
Install the Let's Encrypt root certificates.
Last updated