Repository navigation
feat: split raw data storage into per-dataset SQLite files #8219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Mikhail Astafev (astafan8)
merged 28 commits into
microsoft:main
from
astafan8:feature/split-raw-data-sqlite
Sep 28, 2026
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
28d74a1
feat: split raw data storage into per-dataset SQLite files
eb19cda
address PR review feedback from Jens and Copilot
55ad471
Add update_raw_data_paths helper for relocated raw data files
9956aae
Add update_raw_data_paths documentation to intro.rst and Database.ipynb
2511aee
Fix ruff format and unused import lint issues
7bab7b7
Fix pyright type errors in test_raw_data_storage
dd2c8eb
Add purge_orphaned_datasets and cleanup_datasets management functions
9c8c92f
Add towncrier news fragment for split raw data storage
173137e
Address PR review comments: move queries to queries.py, add prints, s…
3f0195d
Use log.debug for per-dataset reports, Path.unlink() for file removal
c7402e7
Fix extract/export and unsubscribe to use _data_conn for split storage
0127b4a
Apply suggestions from code review
astafan8 d6c0950
Update docs/dataset/dataset_design.rst
astafan8 a8ec63e
Reuse existing qcodes helpers instead of duplicating logic
8a02dd6
Avoid empty results table in main DB for split raw data storage
4813a2d
Extract subscriber create/queue helpers for clarity
af7c878
Address review: make sqlite-file connect helper private, use dataclas…
86bcb21
Update news fragment to mention no empty results table in main DB
6c0be7c
Adapt to stricter ruff rules from main (BLE001, SIM)
b421aeb
Address review on management helpers (queries + _raw_data_storage)
00802f4
Store dataset results via a pluggable ResultsBackend
e11802a
Address review: polymorphic results-table creation, read-only loading…
1f3341d
Batch per-dataset setup writes into single transactions
e0be8e1
Introduce raw_data_backend config and generic backend lifecycle
0380a69
Apply ruff-format to Database.ipynb (wrap long config assignment)
c5868e8
Quote per-dataset result columns; drop manual qcodesrc.json editing f…
a25773b
Harden split-storage config: reject negative cleanup thresholds; reso…
cd2ec34
Address review: safe cleanup, split-aware overview counts, private re…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| Added **split raw data storage** for the DataSet: an opt-in results | ||
| backend selected via the ``dataset.raw_data_backend`` config option | ||
| (set it to ``"sqlite_per_dataset_db"``) that writes raw measurement | ||
| data into individual per-dataset SQLite files while keeping all metadata | ||
| in the main database. This prevents the main DB file from growing | ||
| excessively large and allows users to have a single main SQLite QCoDeS | ||
| database on their PC as opposed to many that grow infinitely. When | ||
| selected, no results table is created in the main database at all - it | ||
| holds only metadata - and all public ``DataSet`` APIs continue to work | ||
| unchanged. Backend-specific settings (such as the per-dataset file | ||
| folder ``raw_data_path``) live under ``dataset.raw_data_backend_config``. | ||
|
|
||
| Management helpers included: | ||
|
|
||
| - ``update_raw_data_paths()``: update stored paths after raw data files | ||
| have been moved to a new folder. | ||
| - ``purge_orphaned_datasets()``: find and remove dataset records whose | ||
| raw data files no longer exist on disk (``dry_run=True`` by default). | ||
| - ``cleanup_datasets()``: remove datasets (DB records and raw data files) | ||
| by age, sample name, or file size (``dry_run=True`` by default). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
astafan8 marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.