| Crates.io | dkdc-lake |
| lib.rs | dkdc-lake |
| version | 0.1.0 |
| created_at | 2025-07-02 15:01:50.45439+00 |
| updated_at | 2025-07-02 15:01:50.45439+00 |
| description | Data lake management for dkdc (don't know, don't care) |
| homepage | https://github.com/lostmygithubaccount/dkdc |
| repository | https://github.com/lostmygithubaccount/dkdc |
| max_upload_size | |
| id | 1735226 |
| size | 56,798 |
Core DuckDB/DuckLake functionality for dkdc (don't know, don't care).
This crate provides the core data lake functionality using DuckDB with the DuckLake extension for encrypted storage. It implements:
The lake uses a two-database architecture:
All data is stored using a unified file-based schema:
CREATE TABLE {table_name} (
filepath VARCHAR, -- Virtual path (e.g., "./files", "./secrets")
filename VARCHAR, -- File or secret name
filedata BLOB, -- Actual content
filesize BIGINT, -- Size in bytes
fileupdated TIMESTAMP -- Last update time
)
use dkdc_lake::Lake;
// Create a new lake instance
let lake = Lake::new()?;
// Store a file
lake.add_file("./documents", "report.pdf", &file_data)?;
// Retrieve a file
if let Some(file) = lake.get_file("./documents", "report.pdf")? {
println!("File size: {} bytes", file.filesize);
}
// Store a secret
lake.set_secret("api_key", b"secret_value")?;
// List files in a directory
let files = lake.list_files("./documents")?;
Get the SQL commands to set up the lake manually:
let sql = lake.get_sql_commands();
This returns:
INSTALL ducklake;
INSTALL sqlite;
ATTACH '/path/to/metadata.db' AS metadata;
ATTACH 'ducklake:sqlite:/path/to/metadata.db' AS data (DATA_PATH '/path/to/data', ENCRYPTED);
USE data;
duckdb: DuckDB database with bundled supportdkdc-config: Configuration managementchrono: Timestamp handlinganyhow: Error handling