DubUrl.Schema.Documents 0.115.0

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

DubUrl.Schema

Provider-neutral database schema models, fluent builders, SQL rendering, discovery mapping, and versioned YAML/JSON documents.

The user documentation is published as part of the single DubUrl website.

Table and column tags

Use WithTags on table and column builders or set the Tags property on the schema model. In v1 JSON and YAML, use the optional tags map. For example, tags: { pii: "true" } assigns a string value. Tag keys are case-sensitive, and tags and annotations can use the same key independently.

Providers implement ISchemaTagMetadataReader to discover tags. Inspection reports TableTagCoverage and ColumnTagCoverage separately. A provider that supports neither scope leaves both as Unsupported. Inaccessible or unrepresentable tags make the inspection incomplete.

For deployment, providers implement ITableTagSqlRenderer and IColumnTagSqlRenderer for the scopes they support. SchemaScriptRenderer reports these capabilities separately and rejects declarations for unsupported scopes during planning.

Table hierarchies

Use WithHierarchy(new Hierarchy("id")) on a table builder with a single-column scalar primary key. In schema documents, set hierarchy: { nodeKey: id } on the table. The declaration requires database enforcement of parent existence by default.

var renderer = new SchemaScriptRenderer(dialect);
var hierarchies = renderer.PreflightHierarchies(schema);

Preflight reports each table's representation, enforcement, and any diagnostic. It uses the renderer's dialect and options without connecting to a database. A plan with IsSupported set to false prevents DDL generation.

DuckDB generates a nullable parent_id with the node key's type and a self-referencing foreign key in CREATE TABLE. Each row with a null parent is a root. The foreign key checks that parents exist and permits cycles. Insert a parent before any statement that inserts a child referencing it. Set requireParentExists to false to allow storage without enforcement on a target where enforcement is unavailable.

Inspect Analysis Services metadata

Use the read-only AnalyticalMetadataInspector with the ADOMD provider registered for the connection URL. The inspector lists visible catalogs and reads objects in the connection's current catalog. The URL overload opens and disposes its own connection. The overload taking an already open connection leaves its ownership and selected catalog with the caller.

using DubUrl.Discovery;
using DubUrl.Schema;

var result = await new AnalyticalMetadataInspector().InspectAsync(connectionUrl, cancellationToken);
var measures = result.Objects.Where(item => item.Id.Kind == AnalyticalObjectKind.Measure);
var measuresComplete = result.Coverage[AnalyticalFeature.Measures] == AnalyticalCoverage.Available;

The tabular reader supplies tables, columns, measures, and perspectives. On endpoints without modern tabular rowsets, it can read table and column inventory from legacy DBSCHEMA rowsets and measures from MDSCHEMA. The multidimensional reader supplies cubes, dimensions, hierarchies, levels, measures, and perspectives. Parent IDs link objects in their own scope. Use PerspectiveMembers for membership, Caption for display, and Id or a reported UniqueName for identity. Native rowset IDs are catalog or scope specific and can change if objects are recreated.

Check coverage before treating a missing object as a failed assertion. An available collection can be empty. Partial, unsupported, and inaccessible metadata have separate coverage values. Data types carry the native rowset value, the normalized DbType when known, and any reported length, precision, or scale. Missing facets have null values. A missing or unmapped type is diagnosed per object. Named sets, member properties, standalone measure groups, and dimension and measure-group relationship assertions are outside this inspector's current coverage.

For live consumer checks, set DUBURL_ADOMD_TABULAR_TEST_URL and DUBURL_ADOMD_MULTIDIM_TEST_URL to test models with the requested object types and run the filter FullyQualifiedName~AnalyticalMetadataInspectorTests in DubUrl.Schema.Testing.

Inspect semantic view metadata

Providers that register an analytical discovery reader can expose semantic or metric views through AnalyticalMetadataInspector. Use AnalyticalObjectKind.SemanticView for views and AnalyticalObjectKind.Measure for their measures, including Snowflake metrics. DimensionField and Fact describe queryable dimensions and row-level facts. The AnalyticalObjectId.SemanticView and LogicalTable properties identify qualified membership. Check the relevant feature coverage before interpreting an empty collection.

For a DuckDB provider with extension discovery support, load the supported semantic_views extension on an open connection and opt in using the borrowed-connection overload:

var inspector = new AnalyticalMetadataInspector(new AnalyticalInspectionOptions
{
    SemanticViewExtension = "semantic_views"
});
var metadata = await inspector.InspectAsync(connectionUrl, openConnection, cancellationToken);

Discovery leaves the connection open and never installs or loads extensions. Provider prerequisites and supported extension and driver versions are documented by their respective provider packages.

Build and test

dotnet build DubUrl.Schema.sln -c Release
dotnet test DubUrl.Schema.Testing -c Release -f net10.0 --no-build
dotnet test DubUrl.Schema.Documents.Testing -c Release -f net10.0 --no-build

CI selects a complete stable DubUrl release for the provider fixtures. Directory.Build.props sets separate minimum versions for DubUrl Core and the provider fixtures. Use -p:DubUrlCoreVersion=<candidate> to validate another Core and ADOMD release, or -p:DubUrlVersion=<candidate> to select a different provider fixture release. See real-database QA and validation.

Discovery identities preserve provider-native qualifiers: SQLite main and attached aliases belong to MetadataName.Database and DatabaseObjectName.Database; they are not schemas. Use DiscoveryOptions.Databases to select aliases, Schemas for actual schemas, and Catalogs for catalogs. These filters also apply to views and their inventory; table filters can match any combination of literal qualifier components. Referenced-table closure preserves each target's complete identity. Rendered attached names require the same aliases to exist in the destination connection.

Git hooks

Enable the repository's pre-push check after cloning:

git config --local core.hooksPath .githooks
dotnet restore DubUrl.Schema.sln

The hook requires the .NET SDK on PATH and Bash (provided by Git for Windows on Windows). It runs dotnet format DubUrl.Schema.sln analyzers --verify-no-changes --no-restore and rejects pushes with analyzer violations. The StyleCop rules in .editorconfig match Expressif's CodeFactor policy.

To apply available analyzer fixes, run dotnet format DubUrl.Schema.sln analyzers --no-restore, review the changes, and rerun the check. Resolve any remaining diagnostics before pushing.

Source was extracted from Seddryck/DubUrl commit 7606da8d030c869dab0dd9d9946dcdd962dfe000; earlier file history remains available there. Public namespaces, package identities, supported TFMs, and document URLs are preserved.

See provider-owned table definitions and physical options.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 (2)

Showing the top 2 NuGet packages that depend on DubUrl.Schema.Documents:

Package Downloads
DubUrl.Application

Transport-neutral application services for validating, rendering, and deploying DubUrl schema documents, and managing curated connectors.

Packata.Database

Shared database connections, provider composition and curated connector acquisition for Packata.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.115.0 0 12/5/2026
0.114.0 0 12/5/2026
0.113.0 99 12/4/2026
0.112.0 108 11/28/2026
0.111.0 686 11/27/2026
0.110.0 174 11/17/2026
0.109.0 474 11/15/2026
0.108.0 172 11/15/2026
0.107.0 241 11/13/2026
0.106.0 253 11/13/2026
0.105.0 241 11/12/2026
0.104.0 5,550 11/10/2026
0.103.0 132 11/10/2026
0.102.1 93 11/9/2026
0.102.0 144 11/9/2026
0.101.4 103 11/6/2026
0.101.3 153 11/3/2026
0.101.2 105 11/3/2026
0.101.1 104 11/3/2026
0.101.0 108 11/3/2026
Loading failed