Skip to content
Merged
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
28 changes: 14 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,15 +381,15 @@ stay queued for the next flush. A flush that fails only for other reasons still
#### `SpiralDBTableSource` reads no rows when it is built, and reads in batches (ITL-186)

A Spiral source used to read its whole table when it was built, which made large tables
unusable (about 4.6 GB for an 8-million-row table). It is now built from the table's metadata
alone, in about a second, and reads rows only when asked: in batches of at most `batch_rows`
rows (default 8,192) for `iter_data()` and pipeline jobs, and all at once for `as_table()` and
the dataframe methods. See "Reading a Spiral table" in `docs/concepts/sources.md`.
unusable because of memory use. It is now built from the table's metadata alone, in about
a second, and reads rows only when asked: in batches of at most `batch_rows` rows (default
8,192) for `iter_data()` and pipeline jobs, and all at once for `as_table()` and the dataframe
methods. See "Reading a Spiral table" in `docs/concepts/sources.md`.

What changes for existing code:

- **Default `source_id`.** It is now `<project id>/<dataset>.<table>@<Spiral table id>`, for
example `edi-tutorial-v1-841226/default.session@table_Jo7J0lpkLcOM` (it was
example `my-project-123456/my_dataset.sensor_reading@table_example12345` (it was
`<project id>/<dataset>/<table>`). SpiralDB's own table id makes it unique: a table dropped
and created again under the same name is a different source. For a Spiral source built
without `source_id`, the `content_hash`, every record ID and every source-info token
Expand Down Expand Up @@ -681,28 +681,28 @@ format 2, prefix `00 00 02`) is lossless; this is a fix, so the old values are n
#### A Spiral source's default `source_id` is `<project id>/<dataset>/<table>` (ITL-926)

`SpiralDBTableSource` used the bare table name as its default `source_id`. Tables with the
same name in different projects (the EDI sample projects all share their table names) then
had the same `content_hash`, record IDs and source-info tokens. In one store, a job on one
project read back the other project's pipeline records along with its own (cached results
same name in different projects then had the same `content_hash`, record IDs and source-info
tokens. In one store, a job on one project read back the other project's pipeline records
along with its own (cached results
were never mixed up: they are keyed on the row's data). The default is now the project id,
the dataset and the table name, for example `edi-sample-v1-855632/default/session`.
the dataset and the table name, for example `my-project-123456/my_dataset/sensor_reading`.

For a Spiral source built without `source_id`, the `content_hash`, every record ID and every
source-info token change, so pipeline records stored by 0.2 for such a source are not found
again. The rows are recorded once more and no result is recomputed, because function results
are keyed on the data. For example, table `subject` (key `subject_id`, one row) in project
`edi-sample-v1-855632`:
are keyed on the data. Here are illustrative values for a row in the `sensor_reading` table
in project `my-project-123456`:

- `source_id`: `subject` becomes `edi-sample-v1-855632/default/subject`.
- `source_id`: `sensor_reading` becomes `my-project-123456/my_dataset/sensor_reading`.
- `content_hash`: `semantic_v0.1:0380725acb90...e7f4f6` becomes
`semantic_v0.1:3a659ed610bb...29a93`.
- Row 0's record ID: `18d1efa53fbc52b6a40f406eca35ca81` becomes
`096c4e22981c52daa2b088bffe729ee7`.

`pipeline_hash` does not change (it depends only on the schema), nor does anything for a
source given an explicit `source_id`. To keep 0.2 identities, pass the old value:
`SpiralDBTableSource(project, "subject", source_id="subject")`. Jobs saved by 0.2 store
their `source_id` explicitly and keep it when loaded.
`SpiralDBTableSource(project, "sensor_reading", source_id="sensor_reading")`. Jobs saved by
0.2 store their `source_id` explicitly and keep it when loaded.

#### The Delta store keeps every column's Arrow type; rebuild a Delta store written by an earlier v0.3 build (ITL-928)

Expand Down
Loading