datanotes 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.cjs +175 -8
- package/dist/api/index.js +175 -8
- package/dist/api/mcp.cjs +175 -8
- package/dist/api/mcp.js +175 -8
- package/dist/datanotes.cjs +591 -139
- package/dist/docs/api/operations/add_column.md +1 -0
- package/dist/docs/api/operations/add_constraint.md +2 -0
- package/dist/docs/api/operations/alter_column.md +1 -1
- package/dist/docs/api/operations/alter_table.md +3 -2
- package/dist/docs/api/operations/check_table.md +1 -1
- package/dist/docs/api/operations/create_table.md +3 -1
- package/dist/docs/api/operations/describe_table.md +1 -1
- package/dist/docs/api/operations/insert_row.md +2 -2
- package/dist/docs/api/operations/tags/rows-dml.md +1 -1
- package/dist/docs/api.md +2 -2
- package/dist/docs/guides/data-quality/check-constraints.md +14 -13
- package/dist/docs/guides/data-quality/hand-edits.md +10 -10
- package/dist/docs/guides/database-objects/bases.md +11 -11
- package/dist/docs/guides/database-objects/catalogs-and-schemas.md +16 -10
- package/dist/docs/guides/database-objects/columns.md +38 -38
- package/dist/docs/guides/database-objects/relations.md +173 -36
- package/dist/docs/guides/database-objects/tables.md +80 -35
- package/dist/docs/guides/database-objects/views.md +44 -44
- package/dist/docs/guides/history/change-data-feed.md +34 -34
- package/dist/docs/guides/history/journal-and-undo.md +12 -12
- package/dist/docs/guides/history/restore.md +20 -20
- package/dist/docs/guides/history/table-history.md +31 -31
- package/dist/docs/guides/read-and-write/automatic-links.md +15 -15
- package/dist/docs/guides/read-and-write/import-notes.md +21 -21
- package/dist/docs/guides/read-and-write/joins-and-aggregates.md +7 -7
- package/dist/docs/guides/read-and-write/read-and-filter.md +10 -10
- package/dist/docs/guides/read-and-write/write-rows.md +10 -10
- package/dist/docs/guides/search/text.md +1 -1
- package/dist/docs/reference/cli.md +1 -1
- package/dist/docs/reference/errors.md +1 -1
- package/dist/docs/reference/operations/auxiliary.md +2 -2
- package/dist/docs/reference/operations/rows.md +1 -1
- package/dist/docs/reference/operations/schema.md +15 -11
- package/dist/docs/reference/operations.md +28 -28
- package/dist/docs/release-notes.md +24 -0
- package/package.json +1 -1
|
@@ -98,7 +98,7 @@ Answer:
|
|
|
98
98
|
"files_created": 1,
|
|
99
99
|
"planned_creates": ["datanotes/main/public/film/Charade.md"],
|
|
100
100
|
"commits": [{ "table": "main.public.film", "version": 2, "operation": "WRITE" }],
|
|
101
|
-
"migration_id": "
|
|
101
|
+
"migration_id": "20261019T040647-insert_row-insert-into-film-2",
|
|
102
102
|
"links_added": [
|
|
103
103
|
{
|
|
104
104
|
"path": "datanotes/main/public/film/Charade.md",
|
|
@@ -127,7 +127,7 @@ Answer:
|
|
|
127
127
|
```markdown
|
|
128
128
|
---
|
|
129
129
|
table: main.public.film
|
|
130
|
-
id:
|
|
130
|
+
id: 01a15257-2f53-7dde-92fd-58531b7610ac
|
|
131
131
|
title: Charade
|
|
132
132
|
year: 1963
|
|
133
133
|
---
|
|
@@ -169,7 +169,7 @@ Answer:
|
|
|
169
169
|
}
|
|
170
170
|
],
|
|
171
171
|
"commits": [{ "table": "main.public.film", "version": 3, "operation": "UPDATE" }],
|
|
172
|
-
"migration_id": "
|
|
172
|
+
"migration_id": "20261019T040647-update_row-update-film",
|
|
173
173
|
"links_added": [
|
|
174
174
|
{
|
|
175
175
|
"path": "datanotes/main/public/film/Charade.md",
|
|
@@ -186,7 +186,7 @@ Answer:
|
|
|
186
186
|
```markdown
|
|
187
187
|
---
|
|
188
188
|
table: main.public.film
|
|
189
|
-
id:
|
|
189
|
+
id: 01a15257-2f53-7dde-92fd-58531b7610ac
|
|
190
190
|
title: Charade
|
|
191
191
|
year: 1963
|
|
192
192
|
---
|
|
@@ -229,7 +229,7 @@ Answer:
|
|
|
229
229
|
}
|
|
230
230
|
],
|
|
231
231
|
"commits": [{ "table": "main.public.film", "version": 4, "operation": "UPDATE" }],
|
|
232
|
-
"migration_id": "
|
|
232
|
+
"migration_id": "20261019T040647-update_row-update-film-2",
|
|
233
233
|
"links_added": [
|
|
234
234
|
{
|
|
235
235
|
"path": "datanotes/main/public/film/Notorious.md",
|
|
@@ -287,7 +287,7 @@ Answer:
|
|
|
287
287
|
}
|
|
288
288
|
],
|
|
289
289
|
"commits": [{ "table": "main.public.film", "version": 5, "operation": "UPDATE" }],
|
|
290
|
-
"migration_id": "
|
|
290
|
+
"migration_id": "20261019T040647-update_row-update-film-3",
|
|
291
291
|
"links_added": [
|
|
292
292
|
{
|
|
293
293
|
"path": "datanotes/main/public/film/Notorious.md",
|
|
@@ -310,7 +310,7 @@ Answer:
|
|
|
310
310
|
```markdown
|
|
311
311
|
---
|
|
312
312
|
table: main.public.film
|
|
313
|
-
id:
|
|
313
|
+
id: 01a15257-2f4c-79be-8415-be44a4b0a704
|
|
314
314
|
title: Notorious
|
|
315
315
|
year: 1946
|
|
316
316
|
---
|
|
@@ -373,7 +373,7 @@ Answer:
|
|
|
373
373
|
"files_created": 1,
|
|
374
374
|
"planned_creates": ["datanotes/main/public/film/Persona.md"],
|
|
375
375
|
"commits": [{ "table": "main.public.film", "version": 6, "operation": "WRITE" }],
|
|
376
|
-
"migration_id": "
|
|
376
|
+
"migration_id": "20261019T040647-insert_row-insert-into-film-3",
|
|
377
377
|
"links_added": [
|
|
378
378
|
{
|
|
379
379
|
"path": "datanotes/main/public/film/Persona.md",
|
|
@@ -390,7 +390,7 @@ Answer:
|
|
|
390
390
|
```markdown
|
|
391
391
|
---
|
|
392
392
|
table: main.public.film
|
|
393
|
-
id:
|
|
393
|
+
id: 01a15257-2f87-7ba7-aa6e-75809acf0984
|
|
394
394
|
title: Persona
|
|
395
395
|
year: 1966
|
|
396
396
|
---
|
|
@@ -472,7 +472,7 @@ Answer:
|
|
|
472
472
|
}
|
|
473
473
|
],
|
|
474
474
|
"commits": [{ "table": "main.public.film", "version": 7, "operation": "UPDATE" }],
|
|
475
|
-
"migration_id": "
|
|
475
|
+
"migration_id": "20261019T040647-update_row-update-film-4",
|
|
476
476
|
"links_added": [
|
|
477
477
|
{
|
|
478
478
|
"path": "datanotes/main/public/film/Persona.md",
|
|
@@ -489,7 +489,7 @@ Answer:
|
|
|
489
489
|
```markdown
|
|
490
490
|
---
|
|
491
491
|
table: main.public.film
|
|
492
|
-
id:
|
|
492
|
+
id: 01a15257-2f87-7ba7-aa6e-75809acf0984
|
|
493
493
|
title: Persona
|
|
494
494
|
year: 1966
|
|
495
495
|
---
|
|
@@ -505,7 +505,7 @@ We watched it at [[2026-10-09T2100|Swedish night]].
|
|
|
505
505
|
|
|
506
506
|
```yaml
|
|
507
507
|
# Metastore (Datanotes): catalogs, schemas, tables, columns, views.
|
|
508
|
-
id:
|
|
508
|
+
id: 01a15257-2f24-7fd9-a38b-535ca8cd7419
|
|
509
509
|
config:
|
|
510
510
|
history: true
|
|
511
511
|
|
|
@@ -620,7 +620,7 @@ Answer:
|
|
|
620
620
|
"files_created": 1,
|
|
621
621
|
"planned_creates": ["datanotes/main/public/film/His Girl Friday.md"],
|
|
622
622
|
"commits": [{ "table": "main.public.film", "version": 8, "operation": "WRITE" }],
|
|
623
|
-
"migration_id": "
|
|
623
|
+
"migration_id": "20261019T040647-insert_row-insert-into-film-4"
|
|
624
624
|
}
|
|
625
625
|
```
|
|
626
626
|
|
|
@@ -629,7 +629,7 @@ Answer:
|
|
|
629
629
|
```markdown
|
|
630
630
|
---
|
|
631
631
|
table: main.public.film
|
|
632
|
-
id:
|
|
632
|
+
id: 01a15257-2fb4-7925-9829-2aab0ce3d7a7
|
|
633
633
|
title: His Girl Friday
|
|
634
634
|
year: 1940
|
|
635
635
|
---
|
|
@@ -663,7 +663,7 @@ Answer:
|
|
|
663
663
|
|
|
664
664
|
```yaml
|
|
665
665
|
# Metastore (Datanotes): catalogs, schemas, tables, columns, views.
|
|
666
|
-
id:
|
|
666
|
+
id: 01a15257-2f24-7fd9-a38b-535ca8cd7419
|
|
667
667
|
config:
|
|
668
668
|
history: true
|
|
669
669
|
autolink: false
|
|
@@ -236,7 +236,7 @@ Refused:
|
|
|
236
236
|
|
|
237
237
|
```text
|
|
238
238
|
pass "time_column" or "filename" (e.g. "{name}") so rows get file names
|
|
239
|
-
Hint: Check the arguments of create_table: name (string, required), description (string), columns (list of objects, required), catalog (string), schema (string), time_column (string), filename (string), partition (string), exclude (list of strings), archive (string), aliases (list of strings), history (boolean), autolink_target (boolean), row_template (string), fields (object), tags (object), dry_run (boolean).
|
|
239
|
+
Hint: Check the arguments of create_table: name (string, required), description (string), columns (list of objects, required), catalog (string), schema (string), time_column (string), filename (string), partition (string), exclude (list of strings), archive (string), aliases (list of strings), history (boolean), autolink_target (boolean), row_template (string), instructions (string), fields (object), tags (object), dry_run (boolean).
|
|
240
240
|
Docs: https://datanotes.dev/reference/operations/schema.md#create_table (offline: read_docs("reference/operations/schema#create_table"))
|
|
241
241
|
```
|
|
242
242
|
|
|
@@ -314,7 +314,7 @@ Answer:
|
|
|
314
314
|
"op": "create_table",
|
|
315
315
|
"planned_texts": ["datanotes/metastore.yaml"],
|
|
316
316
|
"commits": [{ "table": "main.public.film", "version": 0, "operation": "CREATE TABLE" }],
|
|
317
|
-
"migration_id": "
|
|
317
|
+
"migration_id": "20261019T040648-create_table-create-table-main-public-film"
|
|
318
318
|
}
|
|
319
319
|
```
|
|
320
320
|
|
|
@@ -359,7 +359,7 @@ Answer (70 lines)
|
|
|
359
359
|
"path": "Films/Charade.md",
|
|
360
360
|
"set": {
|
|
361
361
|
"table": "main.public.film",
|
|
362
|
-
"id": "
|
|
362
|
+
"id": "01a15257-31b6-75a9-bb7e-06ebf5b385a4",
|
|
363
363
|
"director": "Stanley Donen",
|
|
364
364
|
"title": "Charade"
|
|
365
365
|
},
|
|
@@ -369,7 +369,7 @@ Answer (70 lines)
|
|
|
369
369
|
"path": "Films/His Girl Friday.md",
|
|
370
370
|
"set": {
|
|
371
371
|
"table": "main.public.film",
|
|
372
|
-
"id": "
|
|
372
|
+
"id": "01a15257-31b6-7aac-9ba1-16fb7e23aa0a",
|
|
373
373
|
"director": "Howard Hawks",
|
|
374
374
|
"title": "His Girl Friday"
|
|
375
375
|
},
|
|
@@ -379,7 +379,7 @@ Answer (70 lines)
|
|
|
379
379
|
"path": "Films/Metropolis.md",
|
|
380
380
|
"set": {
|
|
381
381
|
"table": "main.public.film",
|
|
382
|
-
"id": "
|
|
382
|
+
"id": "01a15257-31b6-7d6a-998e-fd8f06c27786",
|
|
383
383
|
"director": "Fritz Lang",
|
|
384
384
|
"title": "Metropolis"
|
|
385
385
|
},
|
|
@@ -389,7 +389,7 @@ Answer (70 lines)
|
|
|
389
389
|
"path": "Films/Nosferatu.md",
|
|
390
390
|
"set": {
|
|
391
391
|
"table": "main.public.film",
|
|
392
|
-
"id": "
|
|
392
|
+
"id": "01a15257-31b6-7a33-a502-afc11c66b564",
|
|
393
393
|
"director": "F. W. Murnau",
|
|
394
394
|
"title": "Nosferatu"
|
|
395
395
|
},
|
|
@@ -399,7 +399,7 @@ Answer (70 lines)
|
|
|
399
399
|
"path": "Films/The Gold Rush.md",
|
|
400
400
|
"set": {
|
|
401
401
|
"table": "main.public.film",
|
|
402
|
-
"id": "
|
|
402
|
+
"id": "01a15257-31b6-7124-9bc9-40a032066bd3",
|
|
403
403
|
"director": "Charlie Chaplin",
|
|
404
404
|
"title": "The Gold Rush"
|
|
405
405
|
},
|
|
@@ -458,7 +458,7 @@ Answer (73 lines)
|
|
|
458
458
|
"path": "Films/Charade.md",
|
|
459
459
|
"set": {
|
|
460
460
|
"table": "main.public.film",
|
|
461
|
-
"id": "
|
|
461
|
+
"id": "01a15257-31bb-7a46-8ac7-181fa5bacea7",
|
|
462
462
|
"director": "Stanley Donen",
|
|
463
463
|
"title": "Charade"
|
|
464
464
|
},
|
|
@@ -468,7 +468,7 @@ Answer (73 lines)
|
|
|
468
468
|
"path": "Films/His Girl Friday.md",
|
|
469
469
|
"set": {
|
|
470
470
|
"table": "main.public.film",
|
|
471
|
-
"id": "
|
|
471
|
+
"id": "01a15257-31bb-7754-a84c-ada8c44c4f96",
|
|
472
472
|
"director": "Howard Hawks",
|
|
473
473
|
"title": "His Girl Friday"
|
|
474
474
|
},
|
|
@@ -478,7 +478,7 @@ Answer (73 lines)
|
|
|
478
478
|
"path": "Films/Metropolis.md",
|
|
479
479
|
"set": {
|
|
480
480
|
"table": "main.public.film",
|
|
481
|
-
"id": "
|
|
481
|
+
"id": "01a15257-31bb-7113-b86a-5d6fdca79420",
|
|
482
482
|
"director": "Fritz Lang",
|
|
483
483
|
"title": "Metropolis"
|
|
484
484
|
},
|
|
@@ -488,7 +488,7 @@ Answer (73 lines)
|
|
|
488
488
|
"path": "Films/Nosferatu.md",
|
|
489
489
|
"set": {
|
|
490
490
|
"table": "main.public.film",
|
|
491
|
-
"id": "
|
|
491
|
+
"id": "01a15257-31bc-7f8b-b4a7-376f074e01cb",
|
|
492
492
|
"director": "F. W. Murnau",
|
|
493
493
|
"title": "Nosferatu"
|
|
494
494
|
},
|
|
@@ -498,7 +498,7 @@ Answer (73 lines)
|
|
|
498
498
|
"path": "Films/The Gold Rush.md",
|
|
499
499
|
"set": {
|
|
500
500
|
"table": "main.public.film",
|
|
501
|
-
"id": "
|
|
501
|
+
"id": "01a15257-31bc-7554-a326-0e8b427aa5c6",
|
|
502
502
|
"director": "Charlie Chaplin",
|
|
503
503
|
"title": "The Gold Rush"
|
|
504
504
|
},
|
|
@@ -519,7 +519,7 @@ Answer (73 lines)
|
|
|
519
519
|
}
|
|
520
520
|
],
|
|
521
521
|
"commits": [{ "table": "main.public.film", "version": 1, "operation": "ADOPT ROWS" }],
|
|
522
|
-
"migration_id": "
|
|
522
|
+
"migration_id": "20261019T040648-adopt_rows-adopt-5-notes-into-film"
|
|
523
523
|
}
|
|
524
524
|
```
|
|
525
525
|
|
|
@@ -536,7 +536,7 @@ Answer:
|
|
|
536
536
|
```markdown
|
|
537
537
|
---
|
|
538
538
|
table: main.public.film
|
|
539
|
-
id:
|
|
539
|
+
id: 01a15257-31bb-7a46-8ac7-181fa5bacea7
|
|
540
540
|
year: 1963
|
|
541
541
|
minutes: 113
|
|
542
542
|
status: watched
|
|
@@ -623,7 +623,7 @@ Answer:
|
|
|
623
623
|
"files_created": 1,
|
|
624
624
|
"planned_creates": ["datanotes/main/public/film/Battleship Potemkin.md"],
|
|
625
625
|
"commits": [{ "table": "main.public.film", "version": 2, "operation": "WRITE" }],
|
|
626
|
-
"migration_id": "
|
|
626
|
+
"migration_id": "20261019T040648-insert_row-insert-into-film"
|
|
627
627
|
}
|
|
628
628
|
```
|
|
629
629
|
|
|
@@ -655,7 +655,7 @@ Answer:
|
|
|
655
655
|
"op": "add_column",
|
|
656
656
|
"planned_texts": ["datanotes/metastore.yaml"],
|
|
657
657
|
"commits": [{ "table": "main.public.film", "version": 4, "operation": "ADD COLUMNS" }],
|
|
658
|
-
"migration_id": "
|
|
658
|
+
"migration_id": "20261019T040650-add_column-add-column-added_by-to-film"
|
|
659
659
|
}
|
|
660
660
|
```
|
|
661
661
|
|
|
@@ -683,7 +683,7 @@ Answer:
|
|
|
683
683
|
"files_created": 1,
|
|
684
684
|
"planned_creates": ["datanotes/main/public/film/Night of the Living Dead.md"],
|
|
685
685
|
"commits": [{ "table": "main.public.film", "version": 5, "operation": "WRITE" }],
|
|
686
|
-
"migration_id": "
|
|
686
|
+
"migration_id": "20261019T040650-insert_row-insert-into-film"
|
|
687
687
|
}
|
|
688
688
|
```
|
|
689
689
|
|
|
@@ -692,7 +692,7 @@ Answer:
|
|
|
692
692
|
```markdown
|
|
693
693
|
---
|
|
694
694
|
table: main.public.film
|
|
695
|
-
id:
|
|
695
|
+
id: 01a15257-37bf-770c-a384-b360bb939197
|
|
696
696
|
director: George A. Romero
|
|
697
697
|
minutes: 96
|
|
698
698
|
status: to watch
|
|
@@ -734,7 +734,7 @@ Answer:
|
|
|
734
734
|
```markdown
|
|
735
735
|
---
|
|
736
736
|
table: main.public.film
|
|
737
|
-
id:
|
|
737
|
+
id: 01a15257-3a49-7617-a437-430fcfdc292a
|
|
738
738
|
year: 1924
|
|
739
739
|
minutes: 45
|
|
740
740
|
status: to watch
|
|
@@ -762,7 +762,7 @@ Answer:
|
|
|
762
762
|
"op": "alter_table",
|
|
763
763
|
"planned_texts": ["datanotes/metastore.yaml"],
|
|
764
764
|
"commits": [{ "table": "main.public.film", "version": 7, "operation": "ALTER TABLE" }],
|
|
765
|
-
"migration_id": "
|
|
765
|
+
"migration_id": "20261019T040652-alter_table-alter-table-main-public-film"
|
|
766
766
|
}
|
|
767
767
|
```
|
|
768
768
|
|
|
@@ -825,7 +825,7 @@ This is the table as you inferred, corrected and extended it on this page. Its d
|
|
|
825
825
|
|
|
826
826
|
```yaml
|
|
827
827
|
# Metastore (Datanotes): catalogs, schemas, tables, columns, views.
|
|
828
|
-
id:
|
|
828
|
+
id: 01a15257-319e-7663-863b-41ff43d87deb
|
|
829
829
|
config:
|
|
830
830
|
history: true
|
|
831
831
|
|
|
@@ -100,9 +100,9 @@ Answer:
|
|
|
100
100
|
"table": "main.public.watch",
|
|
101
101
|
"total": 3,
|
|
102
102
|
"rows": [
|
|
103
|
-
{ "date(occurred_at)": "2026-10-
|
|
104
|
-
{ "date(occurred_at)": "2026-10-
|
|
105
|
-
{ "date(occurred_at)": "2026-10-
|
|
103
|
+
{ "date(occurred_at)": "2026-10-14", "viewings": 1 },
|
|
104
|
+
{ "date(occurred_at)": "2026-10-17", "viewings": 1 },
|
|
105
|
+
{ "date(occurred_at)": "2026-10-18", "viewings": 1 }
|
|
106
106
|
]
|
|
107
107
|
}
|
|
108
108
|
```
|
|
@@ -138,10 +138,10 @@ Answer:
|
|
|
138
138
|
{
|
|
139
139
|
"path": "datanotes/main/public/film/Night of the Living Dead.md",
|
|
140
140
|
"title": "Night of the Living Dead",
|
|
141
|
-
"watched_on": "2026-10-
|
|
141
|
+
"watched_on": "2026-10-18",
|
|
142
142
|
"viewing": [
|
|
143
143
|
{
|
|
144
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
144
|
+
"path": "datanotes/main/public/watch/2026-10-18T2200.md",
|
|
145
145
|
"where": "cinema",
|
|
146
146
|
"with": "Oscar"
|
|
147
147
|
}
|
|
@@ -150,10 +150,10 @@ Answer:
|
|
|
150
150
|
{
|
|
151
151
|
"path": "datanotes/main/public/film/The Gold Rush.md",
|
|
152
152
|
"title": "The Gold Rush",
|
|
153
|
-
"watched_on": "2026-10-
|
|
153
|
+
"watched_on": "2026-10-17",
|
|
154
154
|
"viewing": [
|
|
155
155
|
{
|
|
156
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
156
|
+
"path": "datanotes/main/public/watch/2026-10-17T2030.md",
|
|
157
157
|
"where": "home",
|
|
158
158
|
"with": "my sister"
|
|
159
159
|
}
|
|
@@ -332,23 +332,23 @@ Answer:
|
|
|
332
332
|
"total": 3,
|
|
333
333
|
"rows": [
|
|
334
334
|
{
|
|
335
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
335
|
+
"path": "datanotes/main/public/watch/2026-10-14T2115.md",
|
|
336
336
|
"film": "[[Charade]]",
|
|
337
|
-
"occurred_at": "2026-10-
|
|
337
|
+
"occurred_at": "2026-10-14T21:15",
|
|
338
338
|
"where": "home",
|
|
339
339
|
"place": "my living room"
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
342
|
+
"path": "datanotes/main/public/watch/2026-10-17T2030.md",
|
|
343
343
|
"film": "[[The Gold Rush]]",
|
|
344
|
-
"occurred_at": "2026-10-
|
|
344
|
+
"occurred_at": "2026-10-17T20:30",
|
|
345
345
|
"where": "home",
|
|
346
346
|
"place": "my living room"
|
|
347
347
|
},
|
|
348
348
|
{
|
|
349
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
349
|
+
"path": "datanotes/main/public/watch/2026-10-18T2200.md",
|
|
350
350
|
"film": "[[Night of the Living Dead]]",
|
|
351
|
-
"occurred_at": "2026-10-
|
|
351
|
+
"occurred_at": "2026-10-18T22:00",
|
|
352
352
|
"where": "cinema",
|
|
353
353
|
"place": "the film club downtown"
|
|
354
354
|
}
|
|
@@ -459,12 +459,12 @@ Answer:
|
|
|
459
459
|
"total": 7,
|
|
460
460
|
"rows": [
|
|
461
461
|
{
|
|
462
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
463
|
-
"occurred_at": "2026-10-
|
|
462
|
+
"path": "datanotes/main/public/watch/2026-10-14T2115.md",
|
|
463
|
+
"occurred_at": "2026-10-14T21:15"
|
|
464
464
|
},
|
|
465
465
|
{
|
|
466
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
467
|
-
"occurred_at": "2026-10-
|
|
466
|
+
"path": "datanotes/main/public/watch/2026-10-10T2130.md",
|
|
467
|
+
"occurred_at": "2026-10-10T21:30"
|
|
468
468
|
}
|
|
469
469
|
]
|
|
470
470
|
}
|
|
@@ -31,7 +31,7 @@ Answer:
|
|
|
31
31
|
"files_created": 1,
|
|
32
32
|
"planned_creates": ["datanotes/main/public/film/Metropolis.md"],
|
|
33
33
|
"commits": [{ "table": "main.public.film", "version": 1, "operation": "WRITE" }],
|
|
34
|
-
"migration_id": "
|
|
34
|
+
"migration_id": "20261019T040638-insert_row-insert-into-film"
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
@@ -40,7 +40,7 @@ Answer:
|
|
|
40
40
|
```markdown
|
|
41
41
|
---
|
|
42
42
|
table: main.public.film
|
|
43
|
-
id:
|
|
43
|
+
id: 01a15257-0a57-7094-a53c-2ffddb1a5284
|
|
44
44
|
title: Metropolis
|
|
45
45
|
year: 1927
|
|
46
46
|
minutes: 153
|
|
@@ -103,7 +103,7 @@ Answer:
|
|
|
103
103
|
}
|
|
104
104
|
],
|
|
105
105
|
"commits": [{ "table": "main.public.film", "version": 6, "operation": "UPDATE" }],
|
|
106
|
-
"migration_id": "
|
|
106
|
+
"migration_id": "20261019T040643-update_row-update-film"
|
|
107
107
|
}
|
|
108
108
|
```
|
|
109
109
|
|
|
@@ -174,7 +174,7 @@ Answer:
|
|
|
174
174
|
}
|
|
175
175
|
],
|
|
176
176
|
"commits": [{ "table": "main.public.film", "version": 8, "operation": "UPDATE" }],
|
|
177
|
-
"migration_id": "
|
|
177
|
+
"migration_id": "20261019T040643-update_row-update-film-3",
|
|
178
178
|
"ambiguous_mentions": [
|
|
179
179
|
{
|
|
180
180
|
"path": "datanotes/main/public/film/Nosferatu.md",
|
|
@@ -193,7 +193,7 @@ Answer:
|
|
|
193
193
|
```markdown
|
|
194
194
|
---
|
|
195
195
|
table: main.public.film
|
|
196
|
-
id:
|
|
196
|
+
id: 01a15257-1ca9-7d11-a4d0-bc403634a138
|
|
197
197
|
title: Nosferatu
|
|
198
198
|
year: 1922
|
|
199
199
|
status: watched
|
|
@@ -246,7 +246,7 @@ Answer:
|
|
|
246
246
|
}
|
|
247
247
|
],
|
|
248
248
|
"commits": [{ "table": "main.public.film", "version": 9, "operation": "UPDATE" }],
|
|
249
|
-
"migration_id": "
|
|
249
|
+
"migration_id": "20261019T040643-update_row-update-film-4"
|
|
250
250
|
}
|
|
251
251
|
```
|
|
252
252
|
|
|
@@ -332,7 +332,7 @@ Answer:
|
|
|
332
332
|
}
|
|
333
333
|
],
|
|
334
334
|
"commits": [{ "table": "main.public.film", "version": 10, "operation": "UPDATE" }],
|
|
335
|
-
"migration_id": "
|
|
335
|
+
"migration_id": "20261019T040643-update_rows-update-film"
|
|
336
336
|
}
|
|
337
337
|
```
|
|
338
338
|
|
|
@@ -370,7 +370,7 @@ Answer:
|
|
|
370
370
|
],
|
|
371
371
|
"planned_creates": ["datanotes/main/public/film/Battleship Potemkin.md"],
|
|
372
372
|
"commits": [{ "table": "main.public.film", "version": 11, "operation": "MERGE" }],
|
|
373
|
-
"migration_id": "
|
|
373
|
+
"migration_id": "20261019T040643-merge_rows-merge-2-rows-into-film"
|
|
374
374
|
}
|
|
375
375
|
```
|
|
376
376
|
|
|
@@ -431,7 +431,7 @@ Answer:
|
|
|
431
431
|
}
|
|
432
432
|
],
|
|
433
433
|
"commits": [{ "table": "main.public.film", "version": 12, "operation": "DELETE" }],
|
|
434
|
-
"migration_id": "
|
|
434
|
+
"migration_id": "20261019T040643-delete_rows-archive-1-rows-of-film"
|
|
435
435
|
}
|
|
436
436
|
```
|
|
437
437
|
|
|
@@ -568,6 +568,6 @@ Answer (51 lines)
|
|
|
568
568
|
{ "table": "main.public.film", "version": 22, "operation": "MOVE ROWS" },
|
|
569
569
|
{ "table": "main.public.watchlist", "version": 1, "operation": "MOVE ROWS" }
|
|
570
570
|
],
|
|
571
|
-
"migration_id": "
|
|
571
|
+
"migration_id": "20261019T040643-move_rows-move-4-rows-from-film-to-watch"
|
|
572
572
|
}
|
|
573
573
|
```
|
|
@@ -67,6 +67,6 @@ A write the engine refuses lists its violations, each with a `code`; `check_tabl
|
|
|
67
67
|
| `unknown_column` | Write only the table’s columns: describe_table lists them. To keep a new front matter key, add_column first. | [Describe a table before writing to it](https://datanotes.dev/guides/database-objects/tables/#describe-a-table-before-writing-to-it) |
|
|
68
68
|
| `check` | The row breaks a CHECK constraint of the table (named in the message, with its rule): change the values so the rule holds. describe_table lists the table’s constraints. | [Enforce rules with CHECK constraints](https://datanotes.dev/guides/data-quality/check-constraints/#enforce-rules-with-check-constraints) |
|
|
69
69
|
| `generated` | A generated column is computed by the engine: do not write it; recompute_columns sets it again. | [Recompute generated columns after a hand edit](https://datanotes.dev/guides/data-quality/hand-edits/#recompute-generated-columns-after-a-hand-edit) |
|
|
70
|
-
| `cycle` | A row cannot be its own ancestor:
|
|
70
|
+
| `cycle` | A row cannot be its own ancestor in a hierarchy column, nor depend on itself through an acyclic column: the message shows the path. Point the column to a row that is not on that path. | [Build a tree of rows with a parent link](https://datanotes.dev/guides/database-objects/relations/#build-a-tree-of-rows-with-a-parent-link) |
|
|
71
71
|
| `inverse` | Both sides of a two-way link must agree: write one side, or run align_relations to repair them. | [Repair two-way links with `align_relations`](https://datanotes.dev/guides/database-objects/relations/#repair-two-way-links-with-align_relations) |
|
|
72
72
|
| `unreadable` | The note’s front matter is not valid YAML (the message quotes the parser), so every read leaves the row out: open the note and fix the YAML, such as a quote or bracket left open or a line without `key: value`. read_note shows its text. | [Find rows whose front matter can’t be read](https://datanotes.dev/guides/data-quality/hand-edits/#find-rows-whose-front-matter-cant-be-read) |
|
|
@@ -20,7 +20,7 @@ Examples: [Tables](https://datanotes.dev/guides/database-objects/tables/), [View
|
|
|
20
20
|
|
|
21
21
|
**Describe Table** · read-only
|
|
22
22
|
|
|
23
|
-
Describe a table (`catalog.schema.table` or a shorter unambiguous name): `qualified`, `name`, `catalog`, `schema`, `description`, `aliases`, `layout` (`folder`, `row_folder`: the folder pattern of new rows, `archive`), `options` (`partition`, `filename`, `archive`, `exclude`), typed `columns` with label/aliases/description and the dense flag, `untyped_fields`, `row_count`, and when set: `tags`, `bases` (the bases it inherits from, in order), `constraints` (its CHECKs, name → where), `row_template`, `history`, `autolink_target`, `fields` (their values).
|
|
23
|
+
Describe a table (`catalog.schema.table` or a shorter unambiguous name): `qualified`, `name`, `catalog`, `schema`, `description`, `aliases`, `layout` (`folder`, `row_folder`: the folder pattern of new rows, `archive`), `options` (`partition`, `filename`, `archive`, `exclude`), typed `columns` with label/aliases/description and the dense flag, `untyped_fields`, `row_count`, and when set: `tags`, `bases` (the bases it inherits from, in order), `constraints` (its CHECKs, name → where), `constraint_hints` (their own hints, name → hint), `instructions` (how to fill a row: follow them before you write one), `row_template`, `history`, `autolink_target`, `fields` (their values).
|
|
24
24
|
|
|
25
25
|
Before adding a column (e.g. a new metric), read `columns` and match your concept against `name`, `label`, `aliases` and `description`; reuse an existing column when it means the same.
|
|
26
26
|
|
|
@@ -66,7 +66,7 @@ Examples: [Catalogs, schemas and the database](https://datanotes.dev/guides/data
|
|
|
66
66
|
|
|
67
67
|
**Check Table** · read-only
|
|
68
68
|
|
|
69
|
-
Validate every row against the table (required, types, ranges, enums, links, unknown columns, CHECK constraints, those that follow links included, filtered link targets (ref_where / ref_by), stale generated/identity values, missing inverse links, front matter that cannot be read: code `unreadable`, with no column, for a note whose `table` line names the table but whose YAML is broken, which every other read leaves out). A CHECK violation has code `check` and the CHECK’s name as `constraint` (every other code names its `column`), as in the `violations` of list_changes. Use it to find rows edited by hand that break the schema. Without `table`, every table is checked: each row then names its `table`, `tables_checked` counts the tables checked, and a table that cannot be checked is listed in `errors` ({table, error}) while the others are. The rows with violations are paged: `limit` (default 500, at most 5000) from `offset`; `total` counts them all. (Hand edits are also checked as they happen: see `violations` in list_changes.)
|
|
69
|
+
Validate every row against the table (required, types, ranges, enums, links, unknown columns, CHECK constraints, those that follow links included, filtered link targets (ref_where / ref_by), stale generated/identity values, missing inverse links, cycles of hierarchy and acyclic columns, front matter that cannot be read: code `unreadable`, with no column, for a note whose `table` line names the table but whose YAML is broken, which every other read leaves out). A CHECK violation has code `check` and the CHECK’s name as `constraint` (every other code names its `column`), as in the `violations` of list_changes. Use it to find rows edited by hand that break the schema. Without `table`, every table is checked: each row then names its `table`, `tables_checked` counts the tables checked, and a table that cannot be checked is listed in `errors` ({table, error}) while the others are. The rows with violations are paged: `limit` (default 500, at most 5000) from `offset`; `total` counts them all. (Hand edits are also checked as they happen: see `violations` in list_changes.)
|
|
70
70
|
|
|
71
71
|
Examples: [Relations and hierarchies](https://datanotes.dev/guides/database-objects/relations/), [Hand edits](https://datanotes.dev/guides/data-quality/hand-edits/), [Find rows that break the schema](https://datanotes.dev/guides/data-quality/check-table/).
|
|
72
72
|
|
|
@@ -10,7 +10,7 @@ Every write is validated. Writes to rows and to the schema are journaled and und
|
|
|
10
10
|
|
|
11
11
|
**Insert Row** · write
|
|
12
12
|
|
|
13
|
-
Insert a row (new note). Values are validated against the columns; the note path comes from the table’s `path`/`filename` patterns (e.g. an event logged today about last night lands in last night’s day folder when you set `occurred_at` to last night). `body` is the note text. Generated / identity columns are computed (do not pass them); CHECK constraints are enforced. Returns `migration_id` (undo) and the created path in `planned_creates`. `body` links the notes it mentions by name, at their first mention (automatic links; off with `autolink: false` or the database’s `autolink` setting). `links_added` lists the links made; `ambiguous_mentions` lists the mentions left as text with the notes they may name: read those, then link the right one with update_row and `autolink: false`, or leave the text.
|
|
13
|
+
Insert a row (new note). When describe_table gives the table’s `instructions`, fill the row as they say. Values are validated against the columns; the note path comes from the table’s `path`/`filename` patterns (e.g. an event logged today about last night lands in last night’s day folder when you set `occurred_at` to last night). `body` is the note text. Generated / identity columns are computed (do not pass them); CHECK constraints are enforced. Returns `migration_id` (undo) and the created path in `planned_creates`. `body` links the notes it mentions by name, at their first mention (automatic links; off with `autolink: false` or the database’s `autolink` setting). `links_added` lists the links made; `ambiguous_mentions` lists the mentions left as text with the notes they may name: read those, then link the right one with update_row and `autolink: false`, or leave the text.
|
|
14
14
|
|
|
15
15
|
Examples: [Catalogs, schemas and the database](https://datanotes.dev/guides/database-objects/catalogs-and-schemas/), [Tables](https://datanotes.dev/guides/database-objects/tables/), [Columns and types](https://datanotes.dev/guides/database-objects/columns/), [Bases](https://datanotes.dev/guides/database-objects/bases/), [Relations and hierarchies](https://datanotes.dev/guides/database-objects/relations/), [Validation](https://datanotes.dev/guides/data-quality/validation/), [CHECK constraints](https://datanotes.dev/guides/data-quality/check-constraints/), [Write and move rows](https://datanotes.dev/guides/read-and-write/write-rows/), [Automatic links](https://datanotes.dev/guides/read-and-write/automatic-links/), [Batch writes](https://datanotes.dev/guides/read-and-write/batch/), [Import existing notes](https://datanotes.dev/guides/read-and-write/import-notes/), [Journal and undo](https://datanotes.dev/guides/history/journal-and-undo/), [Table history and time travel](https://datanotes.dev/guides/history/table-history/), [Change data feed](https://datanotes.dev/guides/history/change-data-feed/), [Restore a table or the database](https://datanotes.dev/guides/history/restore/).
|
|
16
16
|
|