Metadata-Version: 2.3
Name: datajunction-server
Version: 0.0.1a61.dev7
Summary: DataJunction server library for running to a DataJunction server
Project-URL: repository, https://github.com/DataJunction/dj
Author-email: DataJunction Authors <yian.shang@gmail.com>
License: MIT
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: <4.0,>=3.8
Requires-Dist: accept-types<1.0.0,>=0.4.1
Requires-Dist: aiosqlite>=0.20.0
Requires-Dist: alembic>=1.10.3
Requires-Dist: antlr4-python3-runtime==4.13.1
Requires-Dist: asciidag<1.0.0,>=0.2.0
Requires-Dist: bcrypt>=4.0.1
Requires-Dist: cachelib<1.0.0,>=0.10.2
Requires-Dist: cachetools>=5.3.1
Requires-Dist: celery<6.0.0,>=5.2.7
Requires-Dist: cryptography>=41.0.3
Requires-Dist: fastapi-cache2>=0.2.1
Requires-Dist: fastapi>=0.110.0
Requires-Dist: google-api-python-client>=2.95.0
Requires-Dist: google-auth-httplib2>=0.1.0
Requires-Dist: google-auth-oauthlib>=1.0.0
Requires-Dist: jinja2>=3.1.4
Requires-Dist: line-profiler>=4.0.3
Requires-Dist: msgpack<2.0.0,>=1.0.5
Requires-Dist: nbformat>=5.10.4
Requires-Dist: opentelemetry-instrumentation-fastapi==0.38b0
Requires-Dist: passlib>=1.7.4
Requires-Dist: psycopg>=3.1.16
Requires-Dist: pydantic<2
Requires-Dist: pytest-asyncio==0.21.2
Requires-Dist: python-dotenv<1.0.0,>=0.19.0
Requires-Dist: python-jose>=3.3.0
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: redis<5.0.0,>=4.5.4
Requires-Dist: requests<=2.29.0,>=2.28.2
Requires-Dist: rich<14.0.0,>=13.3.3
Requires-Dist: sqlalchemy-utils<1.0.0,>=0.40.0
Requires-Dist: sqlalchemy>=2
Requires-Dist: sqlparse<1.0.0,>=0.4.3
Requires-Dist: sse-starlette>=1.6.0
Requires-Dist: strawberry-graphql>=0.204.0
Requires-Dist: types-cachetools>=5.3.0.6
Requires-Dist: yarl<2.0.0,>=1.8.2
Provides-Extra: transpilation
Requires-Dist: sqlglot>=18.0.1; extra == 'transpilation'
Provides-Extra: uvicorn
Requires-Dist: uvicorn[standard]>=0.21.1; extra == 'uvicorn'
Description-Content-Type: text/markdown

# DataJunction

## Introduction

DataJunction (DJ) is an open source **metrics platform** that allows users to define
metrics and the data models behind them using **SQL**, serving as a **semantic layer**
on top of a physical data warehouse. By leveraging this metadata, DJ can enable efficient
retrieval of metrics data across different dimensions and filters.

![DataJunction](docs/static/datajunction-illustration.png)

## Getting Started

To launch the DataJunction UI with a minimal DataJunction backend, start the default docker compose environment.

```sh
docker compose up
```

If you'd like to launch the full suite of services, including open-source implementations of the DataJunction query service and
DataJunction reflection service specifications, use the `demo` profile.

```sh
docker compose --profile demo up
```

DJUI: [http://localhost:3000/](http://localhost:3000/)
DJ Swagger Docs: [http://localhost:8000/docs](http://localhost:8000/docs)
DJQS Swagger Docs: [http://localhost:8001/docs](http://localhost:8001/docs)
Jaeger UI: [http://localhost:16686/search](http://localhost:16686/search)
Jupyter Lab: [http://localhost:8888](http://localhost:8888)

## How does this work?

At its core, DJ stores metrics and their upstream abstractions as interconnected nodes.
These nodes can represent a variety of elements, such as tables in a data warehouse
(**source nodes**), SQL transformation logic (**transform nodes**), dimensions logic,
metrics logic, and even selections of metrics, dimensions, and filters (**cube nodes**).

By parsing each node's SQL into an AST and through dimensional links between columns,
DJ can infer a graph of dependencies between nodes, which allows it to find the
appropriate join paths between nodes to generate queries for metrics.
