title: 'Go SDK' description: 'Connect to Spice using the Go SDK' pagination_prev: null pagination_next: null tags:
Import the package:
Create a SpiceClient using default configuration:
Or pass a custom flight address:
Execute a query and get back an Apache Arrow RecordReader:
Use SqlWithParams() for parameterized queries to prevent SQL injection and improve performance:
Multiple parameter types are supported with automatic type inference:
For explicit type control, use typed parameter constructors:
For more details, see Parameterized Queries.
Check if the Spice instance is healthy:
Connect to Spice Cloud with an API key: