https://github.com/narwhals-dev/narwhals-tpch
TPC-H queries written in a Narwhals-friendly way
https://github.com/narwhals-dev/narwhals-tpch
Last synced: about 1 year ago
JSON representation
TPC-H queries written in a Narwhals-friendly way
- Host: GitHub
- URL: https://github.com/narwhals-dev/narwhals-tpch
- Owner: narwhals-dev
- Archived: true
- Created: 2024-08-26T11:11:01.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-30T13:54:45.000Z (almost 2 years ago)
- Last Synced: 2025-05-18T11:11:24.382Z (about 1 year ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Narwhals TPC-H queries
Utilities for running the TPC-H queries via Narwhals.
Here's an (opinionated) guide to how to get setup:
## Environment setup:
- [install uv](https://github.com/astral-sh/uv?tab=readme-ov-file#installation)
- install Python3.12: `uv python install 3.12`
- create a virtual environment: `uv venv -p 3.12 --seed`
- activate it as per instructions shown on the terminal
- install requirements: `uv pip install -r requirements.txt`
## Generate data
Run `python generate_data.py`.
## Run queries
To run Q1, you can run `python -m execute.q1`.
Please add query definitions in `queries`, and scripts to execute them
in `execute` (see `queries/q1.py` and `execute/q1.py` for examples).