Cortex.IO.Database 1.1.0

dotnet add package Cortex.IO.Database --version 1.1.0
                    
NuGet\Install-Package Cortex.IO.Database -Version 1.1.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="Cortex.IO.Database" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cortex.IO.Database" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Cortex.IO.Database" />
                    
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 Cortex.IO.Database --version 1.1.0
                    
#r "nuget: Cortex.IO.Database, 1.1.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 Cortex.IO.Database@1.1.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=Cortex.IO.Database&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Cortex.IO.Database&version=1.1.0
                    
Install as a Cake Tool

Cortex.IO.Database

ADO.NET database I/O for Cortex with support for PostgreSQL, SQL Server, SQLite, and MySQL.

Part of the Cortex data science ecosystem for .NET.

Requires .NET 10+ and the Cortex core package. Database-specific ADO.NET providers (Npgsql, Microsoft.Data.SqlClient, etc.) are required for each database.

Features

  • Read SQL queries directly into DataFrames with automatic type mapping
  • Write DataFrames to database tables with bulk insert
  • Expression push-down — translates Cortex filters to SQL WHERE clauses
  • Lazy database scans — combine filters, sorts, and limits into a single SQL query
  • Multi-provider — works with any ADO.NET-compatible database
  • Connection pooling and parameterized queries for production use

Installation

dotnet add package Cortex.IO.Database

Quick Start

using Cortex;
using Cortex.IO.Database;

var connStr = "Host=localhost;Database=mydb;Username=user;Password=pass";

var df = DataFrame.ReadSql(connStr, "SELECT * FROM orders WHERE total > 100");
df.GroupBy("status").Agg(x => x.Count()).Print();

df.WriteSql(connStr, "orders_summary", ifExists: "replace");

Lazy Database Scans

var scanner = new DatabaseScanner(conn, "orders", new PostgresDialect());
var result = scanner.Lazy()
    .Filter(Col("amount") > Lit(1000))
    .Head(100)
    .Collect();  // single optimized SQL query
Package Description
Cortex Core DataFrame (required)
Cortex.Cloud Cloud storage I/O (S3, Azure, GCS)
Cortex.Flight Arrow Flight for distributed data transport
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. 
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
1.1.0 103 3/30/2026
1.0.0 100 3/27/2026