Universal.Operative.Sdk.Databricks 2.0.0

dotnet add package Universal.Operative.Sdk.Databricks --version 2.0.0
                    
NuGet\Install-Package Universal.Operative.Sdk.Databricks -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Universal.Operative.Sdk.Databricks" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Universal.Operative.Sdk.Databricks" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Universal.Operative.Sdk.Databricks" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Universal.Operative.Sdk.Databricks --version 2.0.0
                    
#r "nuget: Universal.Operative.Sdk.Databricks, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Universal.Operative.Sdk.Databricks@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Universal.Operative.Sdk.Databricks&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Universal.Operative.Sdk.Databricks&version=2.0.0
                    
Install as a Cake Tool

Universal.Operative.Sdk.Databricks

REST-backed Genie tools for any Operative model. Targets .NET 10 and .NET 11 and uses Universal.Databricks.Client 1.2.0.

One space

using Universal.Databricks.Client;
using Universal.Operative.Sdk.Databricks;

using DatabricksClient workspace = DatabricksClient.FromServicePrincipal(Environment.GetEnvironmentVariable("DATABRICKS_HOST"), Environment.GetEnvironmentVariable("DATABRICKS_CLIENT_ID"), Environment.GetEnvironmentVariable("DATABRICKS_CLIENT_SECRET"), scope: "genie");
GenieSource sales = new GenieSource("sales", "Sales revenue, customers, and regional performance", workspace.Genie, Environment.GetEnvironmentVariable("DATABRICKS_GENIE_SPACE_ID"));
GenieToolSet genie = new GenieToolSet(sales);// Register genie.Tools with the operative, like other ITool implementations.

The question tool omits the source selector when only one source is configured. The caller owns the workspace and its credentials; disposing or replacing tools does not dispose the client.

Multiple spaces and workspaces

GenieToolSet genie = new GenieToolSet(new[] { new GenieSource("sales", "Sales revenue and customers", workspaceA.Genie, salesSpaceId), new GenieSource("finance", "Budgets and actuals", workspaceA.Genie, financeSpaceId), new GenieSource("operations", "Operational performance", workspaceB.Genie, operationsSpaceId), });

Each source binds one space to one caller-owned client. Spaces in the same workspace can share a client; different workspaces or identities can use separate clients. Source names must be unique without regard to case. The model sees names and descriptions, not host URLs, space IDs, or credentials. With several sources, select a source for a new conversation or configure GenieToolSet.Options.DefaultSource. Conversation references retain their source, so follow-ups do not need to select it again. Calls never broadcast a question across all sources.

Register only sources the current caller may use. Tools should be scoped to the operative session, or supplied only to hosts with equivalent authorization. Databricks evaluates access using each configured client's identity; a shared service principal does not represent an individual user's permissions.

Tool calls

ask_genie accepts question, optional source, optional conversation, and optional run_in_background. It submits once, polls for completion, and retrieves the initial query results. To continue an analysis, pass the latest returned reference as conversation; omit it for an independent analysis. A follow-up requires the preceding message to have completed. Independent sources and conversations may run concurrently. Overlapping local questions on the same conversation within a tool set are rejected while an invocation is active. The local guard is released after cancellation or timeout even if remote execution continues; recover the latest message before continuing. Hosts must coordinate stale references and separate tool sets or processes using the same thread.

read_genie_result accepts a returned reference and optionally attachment_id, chunk_index, and row_offset. It checks an existing message without polling or resubmitting. For more rows, pass the exact next_page object as the next call's arguments. Paging supports both additional rows within a chunk and subsequent SQL chunks. Additional chunks require sql scope, for example genie sql or all-apis. The statement identifier is derived from the selected message attachment, never accepted as a model-supplied target.

Answers include text attachments and their purposes, suggested questions, SQL, column names/types, strings and null cells, row counts, service truncation, and next-page information. The default limit is 100 rows per query. Options.MaxRowsPerQuery changes that limit. Temporary external download URLs are not exposed; external-only results are indicated by external_results_available and require a host-managed download workflow. Preserve source attribution when presenting results and treat retrieved content as data.

Waiting and recovery

Polling defaults to five seconds and ten minutes. Options.PollingInterval and Options.PollingTimeout configure it. The foreground tool requests a timeout of the polling limit plus 30 seconds; the host's maximum tool timeout still applies. run_in_background uses Operative's existing background dispatcher and TaskOutput. Register the normal task tools and configure the host's background registry when enabling that path. No background scheduler or persistent task store is created by this package.

Set Options.MessageSubmitted to persist the reference immediately after submission and before polling. The host callback supplies session/tenant association and owns storage, such as session extensions. It is awaited even if the originating wait is canceled after acceptance. References contain only source, conversation ID, and message ID. They can be passed to a fresh tool set with the same source configuration to inspect outstanding work.

An internal polling timeout returns WAIT_TIMEOUT, a reference, and an error flag. Use the read tool to recover rather than resubmitting. Cancellation stops waiting, not server execution. Exceptions after submission retain the reference in Exception.Data["GenieReference"]; persist through the callback because the engine's timeout or background-stop boundary may replace the returned result. HTTP exceptions preserve the Databricks exception as-is. Terminal Genie and SQL failures return error tool results with provider failure details. Submission, polling, and reads never automatically retry or rerun SQL. An interrupted submission whose response was never received may have executed remotely without yielding an identifier.

Run local checks with dotnet test Universal.Operative.Sdk.Databricks.Tests --filter "TestCategory!=Live". The optional live test uses DATABRICKS_HOST, DATABRICKS_CLIENT_ID, DATABRICKS_CLIENT_SECRET, DATABRICKS_GENIE_SPACE_ID, and DATABRICKS_GENIE_TEST_QUESTION. Keep actual values in local secret configuration. Publish Universal.Databricks.Client 1.2.0 before publishing this package.

License

Free for noncommercial use under the Universal.Operative Noncommercial License. Source is closed; commercial use requires a separate license from Andrew Ong.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 1,262 11/18/2026
1.0.0 129 11/16/2026

Targets .NET 10 and .NET 11; removes .NET 8 support.