Works with v1.0+
This guide demonstrates how to use Java to query Spice via the Apache Arrow Flight SQL JDBC driver. The example connects to a local Spice OSS runtime, executes a parameterized query, and fetches results.
git clone https://github.com/spiceai/cookbook.git
cd cookbook/clients/javamvn clean compileIn a separate terminal, start the Spice OSS runtime:
spice runMAVEN_OPTS="--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED" \
mvn exec:java \
-Dexec.mainClass="MessagingServiceApp"Expected output:
Add-ons by account and service:
addon1
addon2
addon6
Add-ons by add-on type:
addon1
addon2
addon4
addon6
addon8
addon10