Skip to main content

Crate ursa_engine

Crate ursa_engine 

Source
Expand description

Ursa’s SQL engine session.

new_session builds a DataFusion SessionContext on which a file is a table: SELECT * FROM 'edges.parquet', 'edges.csv.gz', 'edges/', 'edges/*.parquet', and the same over s3://, gs://, az:// and https://, with object stores registered the first time a URL is read.

Graphs are defined per session (graph). A session may have a .ursa database (database), which keeps its catalog between processes.

Re-exports§

pub use error::user_message;
pub use stores::ensure_object_store;
pub use stores::ensure_object_store_for;

Modules§

database
The .ursa database file: a session’s catalog, kept between processes.
error
Error messages for people, not programmers.
graph
Graphs in a session: their definitions and where they are kept.
options
Ursa’s session settings, set with SET ursa.<name> = … and shown with SHOW ursa.<name>: a DataFusion config extension with the prefix ursa.
paths
Turning a name in FROM into a file location.
serial
Plans that run on one task, for the browser (#278).
stores
Object stores, registered the first time a query names a URL.

Structs§

BlockingError
Why blocking work produced no result: it panicked or was cancelled. Only a native build can see one; inline work on wasm32 cannot fail this way.

Functions§

new_session
A session with Ursa’s defaults.
new_session_with_config
A session with Ursa’s file tables over config. information_schema is turned on, so SHOW TABLES and SHOW COLUMNS work.
open_file_table
Open location (a path, glob, directory or URL) as a listing table. The format and compression come from the file extension; Hive-style partition directories (year=2024/) become columns. A relative path is relative to the current directory, in a session with a database too: a stored definition’s paths are made relative to the database’s directory when it is stored, and resolved against it on replay (see crate::database).
run_blocking
Run f off the async workers (native), or inline (wasm32).