Expand description
The home screen: datui’s answer to “I want to look at my data”, before you have had to answer “where is it, exactly”.
§Roots
Code lives in your working directory; the interesting datasets usually do not. They are on a mount, a NAS, a scratch volume. So the home screen is built around roots — places to look — and catalogs, named datasets and directories:
- The working directory — free, and right for local exports and fixtures.
- Catalogs —
catalog.toml(Ctrl+D adds to it), the filescatalogslists, and the bundledpubliccatalog. A directory in one is a row to step into.
What bridges “code here, data there” with no configuration at all is RECENT:
every dataset you have opened, grouped under the directory or prefix it lives in.
Opening /mnt/data/sales/ once puts /mnt/data/ on the screen as a place row,
and Enter on that row browses it. It is derived state, so it costs nothing to be
wrong and nothing to throw away.
Structs§
- Cloud
Source - One cloud source as the home screen shows it: a row under
CLOUD, and the list of buckets inside it. - Home
State - Home screen state.
- Listing
- What a listing pass produced.
- Listing
Request - Everything
build_listingneeds, gathered on the interface thread from state it already has, so the worker never reaches back into the app. - Mark
- Where the cursor was in a listing the user went inside from.
- Measured
- What measuring a dataset yielded: rows, columns, and total size, each absent when it cannot be known without reading the data.
- Narrowed
- Build the home listing.
- Path
Listing - What the
~prompt lists: the directory part of what is typed, and what is in it. - Path
Name - One name in the directory the
~prompt is typing. - Root
- A place datui will look, and whether it can currently be read.
- Score
Job - What a worker needs to score the filter against a walk’s files.
- Search
State - The result of one recursive walk below the working directory.
- Section
- A titled group of rows on the home screen.
- Shown
Catalog - A catalog as the home screen shows it: a section of named datasets, local and remote alike.
- Shown
Dataset - One dataset of a
ShownCatalog.
Enums§
- Cloud
Look - A directory in an object store that has not said what it holds yet.
- Cloud
Status - Where a cloud source’s listing stands.
- Door
Kind - What a directory’s door opens, from the kind and the tally already in hand.
- Root
Origin - Where a root came from. Shown subtly in the UI so the list is explicable.
- Row
- One line of the home screen. Headers are selectable so a section can be collapsed and expanded from the keyboard.
- RowKey
- What a row is, apart from where it sits: enough to find it again after the rows have been rebuilt or the cap has moved.
- Sort
Mode - How rows are ordered within each section.
Constants§
- BUNDLED_
ORIGIN - The chip on the bundled catalog’s section.
- CATALOG_
ORIGINS - The chips a catalog’s section carries, and nothing else does.
- CLOUD_
PLACE - How a cloud source is addressed on the home screen:
cloud://<id>. Not a URL any library reads; it names the level above a source’s buckets, which no real URL can.
Functions§
- build_
listing - catalog_
entry_ for - The catalog entry
pathis, or is inside, with its catalog’s label: the innermost when one is inside another, the first listed of two at one place. - catalogs
- The catalogs the home screen shows, in order.
- cloud_
account - The source ID and account of a
cloud://<id>/<account>place: an Azure storage account, which has no URL of its own. - cloud_
place - The place for one cloud source.
- cloud_
source_ id - The source ID of a
cloud://<id>place. - codebook_
for - The column notes of the catalog dataset
pathis, or is inside: the innermost when one dataset is inside another. Only datasets that carry notes are considered. - complete_
path - Complete a partially typed path against the directory it names.
- desktop_
recent_ dirs - Directories holding data files that the desktop has recorded you opening.
- directory_
dataset_ url - The URL that opens a cloud directory as one dataset: with its trailing slash, which is what makes it a prefix to scan rather than an object to fetch.
- dirs_
from_ xbel - Extract directories of data files from XBEL content.
- display_
path - Abbreviate a path with
~for display. - door_
kind - Which
DoorKinda door is. - door_
lands - Whether stepping into a directory puts the cursor on its door: only when the door
opens the directory as the one dataset its name says, which is what
Enteron the directory’s own row one level up opens too. Anywhere else the firstEnterwould start a combined read nobody asked for. - door_
name - The door’s name: the directory, and what
Enteron it opens. - door_
reads - What
Enteron a door that is not one table reads, and what it leaves out, for the details pane. The local open reads the commonest format’s files directly inside; a directory of Parquet with subdirectories, or with no files of its own, is scanned whole for Parquet instead. A prefix in an object store is scanned whole in its commonest format. - expand_
user_ path - Expand
~and$VARin a path the user typed. - facts_
for - The record to keep for a row that has just been measured.
- fuzzy_
positions - Character positions in
haystackthatneedlematched, for highlighting. - fuzzy_
score - Whether and how well
needlematcheshaystack, higher being better. - holds_
nothing_ to_ open - Whether a directory holds nothing a
(all files)row could read. - index_
key - The key a record about
pathis filed under in the dataset index. - is_
catalog_ origin - Whether a section’s origin chip says it is a catalog.
- is_
cloud_ place - Whether
pathis one of datui’s owncloud://places rather than a real location. - is_
network_ path - Whether
pathsits on a network filesystem, according to the mount table. - is_
object_ store_ url - Whether
pathis a place in an object store:s3://,gs://, or Azure. - is_
remote_ path - Whether
pathis somewhere reading it could block: an object-store or HTTP URL, or a directory on a network filesystem. - list_
typed_ dir - What a local directory typed at
~holds, for the prompt’s list. Reads the directory, so it runs on a worker. Nothing typed lists the working directory. - login_
of - How a catalog URL is read, in words: what
authandconnectionsay. - look_
into - Find out what a row is, and then what is in it.
- look_
into_ as - As
look_into, reading each file the way the open that follows will read it. - look_
into_ batch - Look into a batch of rows, handing each answer to
eachas it arrives, and remember what was learned. - match_
score - How well an entry answers the filter, by name or by column.
- matching_
column - The first column of
entrythat containsfilter, case-insensitively. - measured_
from - Fold a measured probe into the record kept for a row.
- name_
by_ spec - List a file a format spec’s glob names as data, under the spec’s name. Its name is all that is asked: the listing reads nothing more for it. A file a spec’s magic names was named by the scan, from the bytes it read to sniff it.
- names_
a_ file - Whether a remote path’s name says it is a file: a data extension, or any dot in its last segment. A trailing slash is a prefix whatever the name says.
- names_
under - The names one level below
diramongurls: hows3://,gs://andaz://complete, from buckets, prefixes and datasets datui has already listed, opened or been given by a catalog. Nothing is asked of the store. - object_
place_ label - What to call the top of a place in an object store: a source, an account, a bucket or a container.
- parent_
location - The location one level up from
path, orNoneat the top. - place_
is_ browsable - Whether a place can be listed: a directory, or a prefix in an object store.
- place_
of - The place a recent lives in: its directory, or its prefix in an object store.
- substring_
positions - Character positions of the first case-insensitive occurrence of
needle. - typed_
dir - The directory part of a typed path: everything up to and including its last
separator. For a URL, at least its scheme (
s3://), so the buckets are what is listed under it. - typed_
dir_ is_ url - Whether a typed directory is a URL, listed from what datui already knows rather than read.