githubEdit

codeDotnet SDK

Dotnet SDK for spiceuseai.us

The Dotnet SDKarrow-up-right spiceai is the easiest way to query spiceuseai.usarrow-up-right from Dotnet.

It uses Apache Arrow Flightarrow-up-right to efficiently stream data to the client and Apache Arrowarrow-up-right Records as data frames.

Requirements

  • .Net 6.0+ or .Net Standard 2.0+

Installation

Add Spice SDK

dotnet add package spiceai

Usage

  1. Create a SpiceClient by providing your API key to SpiceClientBuilder. Get your free API key at spiceuseai.usarrow-up-right.

using Spice;

var client = new SpiceClientBuilder()
    .WithApiKey("API_KEY")
    .WithSpiceCloud("http://my_remote_spice_instance:50051")
    .Build();
  1. Execute a query and get back an Apache Arrow Flight Client Record Batch Stream Readerarrow-up-right.

  1. Iterate through the reader to access the records.

Usage with local Spice runtime

Follow the quickstart guidearrow-up-right to install and run spice locally.

Contributing

Contribute to or file an issue with the spice-dotnet library at: https://github.com/spiceai/spice-dotnetarrow-up-right

Last updated

Was this helpful?