Hiperspace.SQL
2.3.4
See the version list below for details.
dotnet add package Hiperspace.SQL --version 2.3.4
NuGet\Install-Package Hiperspace.SQL -Version 2.3.4
<PackageReference Include="Hiperspace.SQL" Version="2.3.4" />
<PackageVersion Include="Hiperspace.SQL" Version="2.3.4" />
<PackageReference Include="Hiperspace.SQL" />
paket add Hiperspace.SQL --version 2.3.4
#r "nuget: Hiperspace.SQL, 2.3.4"
#addin nuget:?package=Hiperspace.SQL&version=2.3.4
#tool nuget:?package=Hiperspace.SQL&version=2.3.4
Hiperspace.SQL
Hiperspace.SQL is a full SQL query engine for Hiperspace, supporting the full range of joins, aggregations, and subqueries.
Hiperspace.SQL provides the same query functionality as a .NET client can use with LINQ queries, but without the need to write code in C#/F#
Hiperspace fully supports point-in-time "time travel" queries that are not possible with Python Data-Frames or DuckDB
Features
- Hiperspace.SQL is not limited to queries of columns within a table, but supports the full navigation of properties of Hiperspace elements
- Where a column is a complex object it is returned as a JSON object
- Executing a batch of SQL statements return columnar data frames (dictionary of column-name and array of values)
- Explain SQL returns the execution plan, detailing the SetSPaces accessed and keys used for search (Key, Index, Scan)
- The Parquet method returns a Parquet file that can be used with any Apache Parquet library, or added to DuckDB OLAP store
Data Dictionary
SCHEMA_TABLE
Column Name | Data Type | Description |
---|---|---|
TABLE_NAME | string | The name of the table |
TABLE_TYPE | string | The type of the table in SCHEMA_PROPERTY |
SCHEMA_COLUMN
Column Name | Data Type | Description |
---|---|---|
TABLE_NAME | string | The name of the table |
COLUMN_NAME | string | The name of the column |
COLUMN_TYPE | string | The type of the table in SCHEMA_PROPERTY |
SCHEMA_PROPERTY
Column Name | Data Type | Description |
---|---|---|
TYPE_NAME | string | The Type Name |
PROPERTY_NAME | string | The name of each property |
PROPERTY_TYPE | string | reference to SCHEMA_PROPERTY.TYPE_NAME |
Examples
Simple query
SELECT p.Name, p.Gender FROM Persons as p WHERE p.Name = 'Lucy'
Query parameters
SELECT p.Name, p.Gender FROM Persons as p WHERE p.Name = :name
Query batches
SELECT p.Name, p.Gender FROM Persons as p WHERE p.Name = :name;
SELECT Name as name, Father as father from Persons ;
Joins
SELECT p.Name, f.Name as Father, f.Father as GrandFather
FROM Persons as p
join Persons as f on p.Father.Name = f.Name
WHERE p.Name = :name
Aggregates
select p.Father.Name, count(p.Name) as Children
from Persons as p
group by p.Father.Name as f
having count(*) > 1;
Like expressions
select p.Father.Name, count(p.Name) as Children
from Persons as p
where Name like 'L%' and Name like '%y' or (Name like '%u%' and Name like '_uc_')
group by p.Father.Name as f
having count(*) > 1;
Null handling
select p.Name, p.Father.Name
from Persons as p
where Name is not null
in query
SELECT p.Name, p.Gender
FROM Persons as p
WHERE p.Gender in (select p2.Gender from Persons as p2 where p2.Name = 'Lucy')
union
SELECT p.Name, p.Gender
FROM Persons as p
WHERE p.Name in ('Lucy', 'Mark')
union
SELECT p.Name, p.Gender
FROM Persons as p
WHERE p.Name in ('Eve', 'Mary')
inline view
SELECT p.Name, p.Gender
FROM Persons as p
join (select p2.Gender from Persons as p2 where p2.Name = 'Lucy') as p3 on p.Gender = p3.Gender
dictionary query
select * from SCHEMA_TABLES;
select * from SCHEMA_COLUMNS;
select * from SCHEMA_PROPERTIES;
API
The Hiperspace.SQL API can be called from any language that supports DOTNET interop, including Python (using pythonnet). Access via the Hiperspace.SQL.Engine object that is constructed with a reference to any domain space.
Explain
Provides a detailed breakdown of the query execution plan
member engine.Explain (source, parameters : IDictionary<string,obj>) : string array =
Execute
Executes the SQL queries and returns an array of Data Frames
member engine.Execute (source , parameters : IDictionary<string,obj>) : IDictionary<string, obj array> array =
Parquet
Executes the SQL queries will a n array of filenames (one for each statement) and returns the filenames after writing the results to the Apache Parquet files.
member this.Parquet (source, fileNames, parameters : IDictionary<string,obj>): string array =
Product | Versions 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 was computed. 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. |
-
net8.0
- FSharp.Core (>= 9.0.300)
- FsLexYacc (>= 11.3.0)
- FsLexYacc.Runtime (>= 11.3.0)
- Hiperspace (>= 2.3.3)
- Microsoft.Bcl.HashCode (>= 6.0.0)
- Microsoft.CodeAnalysis (>= 4.14.0)
- Microsoft.CodeAnalysis.Analyzers (>= 4.14.0)
- Microsoft.CodeAnalysis.CSharp (>= 4.14.0)
- Parquet.Net (>= 5.1.1)
- protobuf-net.Core (>= 3.2.52)
- System.CodeDom (>= 9.0.5)
- System.Numerics.Tensors (>= 9.0.5)
- System.Text.Json (>= 9.0.5)
-
net9.0
- FSharp.Core (>= 9.0.300)
- FsLexYacc (>= 11.3.0)
- FsLexYacc.Runtime (>= 11.3.0)
- Hiperspace (>= 2.3.3)
- Microsoft.Bcl.HashCode (>= 6.0.0)
- Microsoft.CodeAnalysis (>= 4.14.0)
- Microsoft.CodeAnalysis.Analyzers (>= 4.14.0)
- Microsoft.CodeAnalysis.CSharp (>= 4.14.0)
- Parquet.Net (>= 5.1.1)
- protobuf-net.Core (>= 3.2.52)
- System.CodeDom (>= 9.0.5)
- System.Numerics.Tensors (>= 9.0.5)
- System.Text.Json (>= 9.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
https://www.cepheis.com/hiperspace/20250606
# Overview
This release Significantly extends the functionality provided for Cube Analytics by hiperspace and combines streaming recalculation with graph navigation. The cube enhancement is detailed on [OLAP](https://www.cepheis.com/hiperspace/use-case-cube) use-case. To support Cube analytics and code-generation for aggregation service, and a number of additions were made to [Hipersapce](Hiperspace) and [HiLang](HiLang) compiler.
-----
## Blazor enhancements
This release removes obsolete functions that are no longer used, such as `Space()` which has been replaced by `ExportAsync()` to provide a streaming transfer of updates from a `SessionSpace` for higher performance.
### SetSpace
The Bind function now has an addition parameter for read/write so that filter can be used to *delete* elements without the need to open an additional connection
### SubSpace
In addition to ExportAsync and ImportAsync, SubSpaces now include `ExportCacheAsync` and `ImportCacheAsync` to allow a server gRPC endpoint to select all the elements that are needed for a use-case and send them all in one message to the client.
### BrowserSpace
This new type of space has been created in order to address the limitations of blazer web assembly that does not support synchronous network IO. BrowserSpace will be deprecated once WebAssembly support asynchronous threads.
Browser space, any synchronous operation, uses only the local changes cache, while asynchronous operations use either the local cache or the remote store
A matching change has been made to the HiLang code generator to use the local BrowserSpace for synchronous operations while
-----
## Cube Changes
* **CubeFact** property on an Element, now has a mathcing `ICubeFact` inteface and `ICubeDrillDown` for drill-down to further levels of detail
* **CubeHierarchy** property identifies a **CubeDimension** that is a hierarchy, with a reference to the member key/value that provides the parent. This results in as `ICubeHierarchy<>` interface added to the dimension element
* **DeltaIndex** property now results in a `IDeltaIndex<>` element added to `RefSet<>` for the elements `SubSpace` collection, to retrieve all values that have changed since the timestamp. This interface is used by the `Hiperspaced.Meta.Route` map to retrieve all elements that have changed since the last calculation
* **ElementVersion<>** now allows the `AsAt` property to be changed by an application to allow the historical data loading of a Hiperspace for Cube Analytics
* **Additional functions** added for `drilldown()` (*from cube to details*) `cubename()` (*for Graph name of a cube observation*) `contextlabel()` (*use context when retrieving cubes* there might be separate summaries for P&L and implied P&L )
* **SetSpace<>** now has an additional event `OnMissing` that allows missing cube aggregates to be calculated on-demand, or fetched from an external database
-----
The change also includes updates to referenced assemblies