MCPcopy
hub / github.com/antonycourtney/tad

github.com/antonycourtney/tad @v0.14.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.14.0 ↗
1,205 symbols 2,908 edges 134 files 3 documented · 0%
README

Tad

This repository contains the source code for Tad, an application for viewing and analyzing tabular data sets.

The Tad desktop application enables you to quickly view and explore tabular data in several of the most popular tabular data file formats: CSV, Parquet, and SQLite and DuckDb database files. Internally, the application is powered by an in-memory instance of DuckDb, a fast, embeddable database engine optimized for analytic queries.

The core of Tad is a React UI component that implements a hierarchical pivot table that allows you to specify a combination of pivot, filter, aggregate, sort, column selection, column ordering and basic column formatting operations. Tad delegates to a SQL database for storage and analytics, and generates SQL queries to perform all analytic operations specified in the UI.

Tad can be launched from the command line like this:

$ tad MetObjects.csv

This will open a window with a scrollable view of the full contents of the CSV file:

Tad screenshot

Tad uses SlickGrid for rendering the data grid. This allows Tad to support efficient linear scrolling of the entire file, even for very large (millions of rows) data sets.

A few additional mouse clicks on the above view yields this view, pivoted by a few columns (Department, Classification, Period and Culture), sorted by the Object Start Date column, and with columns re-ordered:

tad screenshot

Installing Tad

The easiest way to install the Tad desktop app is to use a pre-packaged binary release. See The Tad Landing Page for information on the latest release and download links, or go straight to the releases page.

History and What's Here

Tad was initially released in 2017 as a standalone desktop application for viewing and exploring CSV files.

The core of Tad is a React UI component that implements a hierarchical pivot table that allows you to specify a combination of pivot, filter, aggregate, sort, column selection, column ordering and basic column formatting operations. Tad delegates to a SQL database for storage and analytics, and generates SQL queries to perform all analytic operations specified in the UI.

This repository is a modular refactor of the original Tad source code, with several key improvements on the original code base:

  • The repository is organized as a modular Lerna based monorepo.
  • The code has been ported to TypeScript and the UI code has been updated to React Hooks.
  • There is support for communicating with multiple database back ends for reltab (Tad's SQL generation and query evaluation layer), in addition to the original sqlite. Current backends (in varying degrees of completeness) include DuckDb, Snowflake, Google BigQuery, and AWS Athena (Presto)
  • There is a minimal proof-of-concept web-based front-end to demonstrate how Tad can be deployed on the web.
  • The core Tad pivot table component now builds in its own module independent of any front end. This should allow embedding the Tad pivot table in other applications or contexts.

The Essential Packages

The core packages that are used to build Tad are found in the packages sub-directory. These are the packages used to build the Tad desktop application:

  • reltab - The core abstraction used in Tad for programmatically constructing and executing relational SQL queries. This also defines the driver interface implemented by specific database back-ends, and a small, transport-agnostic remoting layer to allow queries and results to be transmitted between a web browser (or electron renderer process) and a reltab backend server.
  • reltab-duckdb -- reltab driver for DuckDb
  • reltab-sqlite -- reltab driver for SQLite
  • aggtree - A library built on top of reltab for constructing pivot trees from relational queries.
  • tadviewer - The core Tad pivot table UI as a standalone, embeddable React component.
  • tad-app - The Tad desktop application, built with Electron

Experimental Packages

This repository also includes a number of proof-of-concept experimental packages, in varying states of completeness. These are provided for reference and as a starting point for further investigation and development.

Building Tad from Source

Detailed instructions on building tad from sources available in doc/building.md

Extension points exported contracts — how you extend this code

DbDriver (Interface)
(no doc) [12 implementers]
packages/reltab/src/DataSource.ts
FormatOptions (Interface)
(no doc) [4 implementers]
packages/tadviewer/src/FormatOptions.ts
LogTableOptions (Interface)
(no doc)
packages/reltab-sqlite/test/testUtils.ts
LogTableOptions (Interface)
(no doc)
packages/reltab-duckdb/test/testUtils.ts
LogTableOptions (Interface)
(no doc)
packages/aggtree/test/testUtils.ts
LogTableOptions (Interface)
(no doc)
packages/reltab-bigquery/test/testUtils.ts
LogTableOptions (Interface)
(no doc)
packages/reltab-snowflake/test/testUtils.ts
ImportedFileInfo (Interface)
(no doc)
packages/reltab-fs/src/reltab-fs.ts

Core symbols most depended-on inside this repo

extend
called by 212
packages/reltab/src/Schema.ts
evalQuery
called by 114
packages/reltab/src/DataSource.ts
join
called by 76
packages/reltab/src/QueryExp.ts
filter
called by 50
packages/reltab/src/QueryExp.ts
concat
called by 50
packages/reltab/src/QueryExp.ts
constVal
called by 45
packages/reltab/src/defs.ts
contains
called by 41
packages/reltab/src/FilterExp.ts
ppOut
called by 30
packages/reltab/src/defs.ts

Shape

Function 763
Method 252
Interface 103
Class 87

Languages

TypeScript100%

Modules by API surface

packages/tadviewer/html/js/jquery.min.js64 symbols
packages/tad-app/html/userdocs/js/jquery.min.js64 symbols
doc/site/js/jquery.min.js64 symbols
packages/reltab/src/QueryExp.ts49 symbols
packages/reltab/src/DataSource.ts39 symbols
packages/tadviewer/src/actions.ts35 symbols
packages/reltab/src/FilterExp.ts35 symbols
packages/reltab/src/defs.ts31 symbols
packages/reltab/src/remote/server.ts29 symbols
packages/reltab-sqlite/src/csvimport.ts29 symbols
packages/reltab/src/remote/Connection.ts28 symbols
packages/tadviewer/src/components/DataGrid.tsx27 symbols

Dependencies from manifests, versioned

@blueprintjs/core4.12.0 · 1×
@blueprintjs/icons4.10.1 · 1×
@blueprintjs/popover21.10.1 · 1×
@electron/notarize2.3.2 · 1×
@google-cloud/bigquery5.9.3 · 1×
@types/byline4.2.33 · 1×
@types/command-line-args5.2.0 · 1×
@types/command-line-usage5.0.2 · 1×
@types/express4.17.13 · 1×
@types/he1.1.2 · 1×
@types/jest27.4.0 · 1×
@types/lodash4.14.178 · 1×

For agents

$ claude mcp add tad \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact