Sqlite databases as Grain datasets.
Project description
🌾 SQL Grain
SQLite databases as Grain data sources.
sql-grain lets you prototype ML data pipelines using SQL queries before committing to a production data format. Define your training examples with expressive SQL—joins, window functions, filtering—and iterate quickly without preprocessing. When you're ready to scale, convert to ArrayRecord or similar formats; sql-grain is not designed for large-scale training.
from sqlgrain import Sqlite3DataSource
import grain
source = Sqlite3DataSource(
"data.db",
key_query="SELECT id FROM users",
record_query="SELECT item FROM purchases WHERE user_id = :id ORDER BY timestamp",
)
dataset = grain.MapDataset.source(source).shuffle().batch(32)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sql_grain-0.1.0.tar.gz.
File metadata
- Download URL: sql_grain-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bc362f14c22dbe0264b18386130f03bf6792689f121f1183cac6ec70743c900
|
|
| MD5 |
4a0de5bc7fb4ffc7f186090f817d5b9a
|
|
| BLAKE2b-256 |
4b9ddcbc9212f691ea939285571e416e2cd4e9b661c53bc42d290b327578873f
|
Provenance
The following attestation bundles were made for sql_grain-0.1.0.tar.gz:
Publisher:
ci.yml on tillahoffmann/sql-grain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sql_grain-0.1.0.tar.gz -
Subject digest:
2bc362f14c22dbe0264b18386130f03bf6792689f121f1183cac6ec70743c900 - Sigstore transparency entry: 782356659
- Sigstore integration time:
-
Permalink:
tillahoffmann/sql-grain@775a4b0bbd1eb36020f6ff6ec3afd71dd69f7e7b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tillahoffmann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@775a4b0bbd1eb36020f6ff6ec3afd71dd69f7e7b -
Trigger Event:
push
-
Statement type:
File details
Details for the file sql_grain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sql_grain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
389f58ab69a8bc488fda9b11ddce7b429cfbe5d8e86c027dc8c727ee6f06fa43
|
|
| MD5 |
ee02794ad65f62d6ac243765bc20efbf
|
|
| BLAKE2b-256 |
517006cba69a02c87dc1f5ca672e9c17f86ee78de7a73f9673688b383dbf3db2
|
Provenance
The following attestation bundles were made for sql_grain-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on tillahoffmann/sql-grain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sql_grain-0.1.0-py3-none-any.whl -
Subject digest:
389f58ab69a8bc488fda9b11ddce7b429cfbe5d8e86c027dc8c727ee6f06fa43 - Sigstore transparency entry: 782356660
- Sigstore integration time:
-
Permalink:
tillahoffmann/sql-grain@775a4b0bbd1eb36020f6ff6ec3afd71dd69f7e7b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tillahoffmann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@775a4b0bbd1eb36020f6ff6ec3afd71dd69f7e7b -
Trigger Event:
push
-
Statement type: