Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

37 investigate making use of parquet data formats #50

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
462 changes: 462 additions & 0 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ axum = "0.7.4"
chrono = { version = "0.4.34", features = ["serde", "rustc-serialize"] }
csv = "1.3.0"
dotenvy = "0.15.7"
parquet = "50.0.0"
serde = { version = "1.0.196", features = ["derive"] }
serde_json = "1.0.113"
sqlx = { version = "0.7.3", features = ["runtime-tokio-rustls", "any", "postgres", "chrono"] }
Expand Down
Binary file added data/db_dumps/_sqlx_migrations_20240204-2219.parquet
Binary file not shown.
Binary file added data/db_dumps/sensor_data_20240204-2219.parquet
Binary file not shown.
24,476 changes: 24,476 additions & 0 deletions data/db_dumps/sensor_data_20240220.csv

Large diffs are not rendered by default.

Binary file added data/db_dumps/sensor_data_20240220.parquet
Binary file not shown.
Binary file added data/db_dumps/sensors_20240204-22219.parquet
Binary file not shown.
Binary file added data/home_data_09122023.parquet
Binary file not shown.
Binary file added data/home_data_10122023.parquet
Binary file not shown.
Binary file added data/home_data_11122023.parquet
Binary file not shown.
Binary file added data/home_data_18112023.parquet
Binary file not shown.
Binary file added data/home_data_22112023.parquet
Binary file not shown.
Binary file added data/home_data_23112023.parquet
Binary file not shown.
Binary file added data/home_data_24112023.parquet
Binary file not shown.
Binary file added data/home_data_25112023.parquet
Binary file not shown.
Binary file added data/home_data_26112023.parquet
Binary file not shown.
Binary file added data/home_data_27112023.parquet
Binary file not shown.
14 changes: 13 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,20 @@ shell-db:

# Run clippy on all code
lint:
cargo clippy
cargo clippy

# Run the API service (without docker)
run:
cargo run

# Convert all .csv files in data/ to .parquet using csv2parquet
convert:
@for file in data/*.csv; do \
echo "Converting $file to Parquet"; \
csv2parquet $file "data/$(basename $file .csv).parquet"; \
done

@for file in data/db_dumps/*.csv; do \
echo "Converting $file to Parquet"; \
csv2parquet $file "data/db_dumps/$(basename $file .csv).parquet"; \
done
Loading