MCPcopy Index your code
hub / github.com/datafusion-contrib/tpctools

github.com/datafusion-contrib/tpctools @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
23 symbols 36 edges 4 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

TPC Tools

Command-line tools for invoking TPC-H and TPC-DS data generators in parallel and re-organizing the output files into directory structures that can be consumed by tools such as Apache Spark or Apache Arrow DataFusion/Ballista.

Also supports converting the output to Parquet.

TPC-DS

Install dependencies.

sudo apt install gcc make flex bison byacc git

Download data generator from https://www.tpc.org/tpc_documents_current_versions/current_specifications5.asp

cd /path/to/DSGen-software-code-3.2.0rc1/tools
make

Generate data.

mkdir /tmp/tpcds/sf1000

cargo run --release -- generate --benchmark tpcds \
  --scale 1000 \
  --partitions 48 \
  --generator-path /path/to/DSGen-software-code-3.2.0rc1/tools \
  --output /tmp/tpcds/sf1000/

Example output.

Generated TPC-DS data at scale factor 1000 with 48 partitions in: 6247.155671938s

Convert to Parquet

mkdir /tmp/tpcds/sf1000-parquet

cargo run --release -- convert --benchmark tpcds \
  --input /tmp/tpcds/sf1000/
  --output /tmp/tpcds/sf1000-parquet/

TPC-H

Install dependencies.

git clone git@github.com:databricks/tpch-dbgen.git
cd tpch-dbgen
make
cd ..

Generate data.

mkdir /tmp/tpch

cargo run --release -- generate --benchmark tpch \
  --scale 1 \
  --partitions 2 \
  --generator-path ./tpch-dbgen/ \
  --output /tmp/tpch

Convert data to Parquet

mkdir /tmp/tpch-parquet

cargo run --release -- convert \
  --benchmark tpch \
  --input /tmp/tpch/ \
  --output /tmp/tpch-parquet/

Legal Stuff

TPC-H is Copyright © 1993-2022 Transaction Processing Performance Council. The full TPC-H specification in PDF format can be found here

TPC-DS is Copyright © 2021 Transaction Processing Performance Council. The full TPC-DS specification in PDF format can be found here

TPC, TPC Benchmark, TPC-H, and TPC-DS are trademarks of the Transaction Processing Performance Council.

Extension points exported contracts — how you extend this code

Tpc (Interface)
(no doc) [2 implementers]
src/lib.rs

Core symbols most depended-on inside this repo

move_or_copy
called by 5
src/lib.rs
create_benchmark
called by 2
src/main.rs
convert_to_parquet
called by 1
src/lib.rs
is_same_device
called by 1
src/lib.rs
convert_tbl
called by 1
src/lib.rs
get_table_names
called by 1
src/tpcds.rs
generate
called by 1
src/tpch.rs
get_table_names
called by 1
src/tpch.rs

Shape

Method 10
Function 7
Class 4
Enum 1
Interface 1

Languages

Rust100%

Modules by API surface

src/tpcds.rs7 symbols
src/tpch.rs6 symbols
src/main.rs5 symbols
src/lib.rs5 symbols

For agents

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

⬇ download graph artifact