mostlyright-data 0.29.13__tar.gz → 0.30.1__tar.gz
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.
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/PKG-INFO +4 -1
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/pyproject.toml +32 -2
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/commands.md +1 -1
- mostlyright_data-0.30.1/skills/mr-data-build/references/preparing-table-search.md +362 -0
- mostlyright_data-0.30.1/src/mostlyright/data_harness/thin/table_search_contract.json +433 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4.py +29 -11
- mostlyright_data-0.30.1/src/mostlyright/data_harness/thin/v4_search.py +1147 -0
- mostlyright_data-0.30.1/src/mostlyright/data_harness/thin/v4_search_contract.py +317 -0
- mostlyright_data-0.29.13/skills/mr-data-build/references/preparing-table-search.md +0 -169
- mostlyright_data-0.29.13/src/mostlyright/data_harness/thin/v4_search.py +0 -279
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/.gitignore +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/README.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/scripts/hatch_build.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/SKILL.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/agents/openai.yaml +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/1-open-the-page-and-the-link-to-it-in-the-first-message.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/2-brief-two-to-four-questions-each-with-a-recommended-answer.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/3-probe-read-a-source-before-committing-to-it.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/4-decide-say-what-you-chose-what-you-refused-and-ask-one-question.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/5-draft-one-recipe-document-one-call.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/6-build-one-run-sized-to-acquire-every-measured-source-whole.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/7-interrogate-ask-the-run-what-it-actually-delivered.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/8-fix-revise-the-document-and-register-it-again.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/9-present-only-what-survived-inspection-with-caveats.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/agent-protocol.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/autonomous-delivery.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/before-the-first-tool-call.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/boundaries.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/cloud-authentication-preflight.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/cross-repository-protocol-reference.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/installation-parity.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/live-run.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/making-a-table-incremental.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/narrating-the-run.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/not-hosted-yet.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/one-install.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/patterns.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/prediction-labels.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/promote.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/readers.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/receipts.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/recipe-test.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/recording-a-stream-venue.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/recovering-an-import-failure.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/reference-pages.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/required-protocol.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/source-credentials.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/sources.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/the-one-thing-to-say-about-the-skill-itself.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/transforms.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/user-communication-contract.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/writing-a-decision-record.md +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/scripts/write_research_notebook.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/__init__.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/agent_protocol.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/canonical.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/formats.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/hosted_crawler_protocol.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/key_seam.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/page_coverage.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/part_check_evidence.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/session_probes.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/skill_assets.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/table_manifest.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/__init__.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/acquire.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/acquire_cancel.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/activity.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/approvals.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/backoff.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/categories.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/commands.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/dataset-categories-v1.json +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/download.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/fast_features.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/narrative.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/parity.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/probe.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/progress_rate.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/progress_vocabulary.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/propose.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/recipe.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/recipe_brief.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/recipe_explain.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/recipe_forecast.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/recipe_lint.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/recipe_test.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/refresh_rehearsal.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/release_check.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/research.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/router.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/run_diagnose.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/run_prefix.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/runs.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/session.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/stream.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/stream_venue.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/studio_capabilities.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/support.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/transport.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/user_agent.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_artifacts.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_catalog.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_connected.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_connections.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_dataset_covers.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_datasets.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_handoff.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_narrative.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_public.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_query.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_reader.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_runs.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_secrets.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_stream.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/v4_tables.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/thin/vocabulary.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/__init__.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/attendance.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/clarification.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/cloud_auth.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/commands/__init__.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/commands/auth.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/commands/clarify.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/commands/login.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/commands/whoami.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/credential_native.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/credential_store.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/credentials.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/login.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/path_kind.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/plain_file.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/remediation.py +0 -0
- {mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/src/mostlyright/data_harness/ux/render.py +0 -0
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mostlyright-data
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.30.1
|
|
4
4
|
Summary: Mostly Right hosted CLI for reviewed datasets
|
|
5
5
|
Project-URL: Homepage, https://mostlyright.md/
|
|
6
6
|
Project-URL: Documentation, https://mostlyright.md/docs/guides/cli/
|
|
7
7
|
Requires-Python: >=3.11
|
|
8
8
|
Provides-Extra: build
|
|
9
|
+
Requires-Dist: hatch-vcs==0.5.0; extra == 'build'
|
|
9
10
|
Requires-Dist: hatchling==1.28.0; extra == 'build'
|
|
11
|
+
Requires-Dist: setuptools-scm==10.3.4; extra == 'build'
|
|
10
12
|
Requires-Dist: uv-build==0.11.3; extra == 'build'
|
|
13
|
+
Requires-Dist: vcs-versioning==2.6.0; extra == 'build'
|
|
11
14
|
Description-Content-Type: text/markdown
|
|
12
15
|
|
|
13
16
|
# mostlyright-data
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mostlyright-data"
|
|
3
|
-
version
|
|
3
|
+
# The release tag is the version. `hatch-vcs` reads it from git at build time, so a release is a
|
|
4
|
+
# `v*` tag push and no file states the number. See docs/RELEASING.md.
|
|
5
|
+
dynamic = ["version"]
|
|
4
6
|
description = "Mostly Right hosted CLI for reviewed datasets"
|
|
5
7
|
readme = "README.md"
|
|
6
8
|
requires-python = ">=3.11"
|
|
@@ -17,8 +19,11 @@ mr-data = "mostlyright.data_harness.thin.router:main"
|
|
|
17
19
|
|
|
18
20
|
[project.optional-dependencies]
|
|
19
21
|
build = [
|
|
22
|
+
"hatch-vcs==0.5.0",
|
|
20
23
|
"hatchling==1.28.0",
|
|
24
|
+
"setuptools-scm==10.3.4",
|
|
21
25
|
"uv-build==0.11.3",
|
|
26
|
+
"vcs-versioning==2.6.0",
|
|
22
27
|
]
|
|
23
28
|
|
|
24
29
|
[dependency-groups]
|
|
@@ -38,9 +43,34 @@ dev = [
|
|
|
38
43
|
pypi-release = ["twine==6.2.0"]
|
|
39
44
|
|
|
40
45
|
[build-system]
|
|
41
|
-
requires = [
|
|
46
|
+
requires = [
|
|
47
|
+
"hatch-vcs==0.5.0",
|
|
48
|
+
"hatchling==1.28.0",
|
|
49
|
+
"setuptools-scm==10.3.4",
|
|
50
|
+
"vcs-versioning==2.6.0",
|
|
51
|
+
]
|
|
42
52
|
build-backend = "hatchling.build"
|
|
43
53
|
|
|
54
|
+
# `uv sync` rebuilds the editable install when the commit or the tags change, so the installed
|
|
55
|
+
# version follows a new release tag.
|
|
56
|
+
[tool.uv]
|
|
57
|
+
cache-keys = [{ file = "pyproject.toml" }, { git = { commit = true, tags = true } }]
|
|
58
|
+
|
|
59
|
+
[tool.hatch.version]
|
|
60
|
+
source = "vcs"
|
|
61
|
+
|
|
62
|
+
# Only `v<digits>` tags are releases. A commit after the last one builds as that release's
|
|
63
|
+
# version, as a checkout between releases always has: `mr-data propose` records the version as
|
|
64
|
+
# plain X.Y.Z and refuses anything else. A tree without git history builds as 0.0.0.
|
|
65
|
+
[tool.hatch.version.raw-options]
|
|
66
|
+
tag_regex = "^v(?P<version>[0-9]+(?:\\.[0-9]+)*(?:(?:a|b|rc)[0-9]+)?)$"
|
|
67
|
+
version_scheme = "only-version"
|
|
68
|
+
local_scheme = "no-local-version"
|
|
69
|
+
fallback_version = "0.0.0"
|
|
70
|
+
|
|
71
|
+
[tool.hatch.version.raw-options.scm.git]
|
|
72
|
+
describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v[0-9]*"]
|
|
73
|
+
|
|
44
74
|
[tool.hatch.build.targets.wheel]
|
|
45
75
|
sources = ["src"]
|
|
46
76
|
only-include = [
|
{mostlyright_data-0.29.13 → mostlyright_data-0.30.1}/skills/mr-data-build/references/commands.md
RENAMED
|
@@ -30,7 +30,7 @@ run in full.
|
|
|
30
30
|
| `mr-data runs` | Report this workspace's own runs: identifier, mode, state and creation time, plus the failure triple of any that failed and whether that failure was the execution room's. `--dataset DATASET_ID` narrows it to one dataset's runs, so "what have I run for this dataset?" is one scoped read, and a value that is not an identifier is refused `THIN_ARGUMENT_INVALID`. `--status` and `--mode` narrow it too and are refused `THIN_ARGUMENT_INVALID` for a word outside the seven states or the six modes; the three combine. Studio narrows before it cuts a page, so a filtered page holds the newest runs that match however many runs the workspace has. `--limit` says how many, and pages are followed to reach it; a listing that does not end says how many were read and suggests a smaller `--limit` or a narrower filter. The answer prints `next_cursor`, and `--cursor` continues from it. |
|
|
31
31
|
| `mr-data watch` | Stream one run's live progress under the durable event type of each stage, resuming across stream cuts. Exits non-zero when the run failed. |
|
|
32
32
|
| `mr-data query` | Run one bounded read-only SQL statement over a finished run's own table and print the rows. Name the table `run_table` in the SQL, whatever the recipe called it. Bounded on rows, on answer bytes and on time, and refused by name when a bound is crossed. When no worker can answer, the refusal names `mr-data download RUN_ID` as `fallback_command`, which brings the table here to read locally. The question is asked through Mostly Right Cloud; while its usage paywall is on and the workspace is unsubscribed, each answered query counts toward the person's monthly allowance, and a spent allowance refuses `THIN_USAGE_LIMIT`. A refusal after the question was queued names its `query_id`; running the same command again reads that query back. |
|
|
33
|
-
| `mr-data search` | `search VERB` prepares and tests versioned search for a new table through Studio; no model or index runs on this computer. The verbs are `inspect`, `sample`, `values`, `propose`, `configure`, `validate`, `add-cases`, `explain`, `preview`, `evaluate`, `estimate`, `build`, `status`, `activate`, `cancel` and `
|
|
33
|
+
| `mr-data search` | `search VERB` prepares and tests versioned search for a new table through Studio; no model or index runs on this computer. The verbs are `inspect`, `sample`, `values`, `propose`, `configure`, `validate`, `add-cases`, `explain`, `preview`, `evaluate`, `estimate`, `build`, `status`, `activate`, `cancel`, `rollback`, `locate` and `try`. `inspect`, `propose` and `validate` also take `--recipe FILE` before registration. `validate --spec` checks a spec and its evaluation cases against the pinned contract without sending anything. `locate` resolves evaluation-case rows to locators, and `try` runs one query against the live search. A build returns promptly with job coordinates, and an operation Studio does not serve answers a typed capability error. [Prepare search](preparing-table-search.md) says how it fits a build. |
|
|
34
34
|
| `mr-data peek` | Print the columns, their logical types and the first rows of one run's table. The type comes off the run's own column profile where the preview carries none, so `type` is null only for a run that sealed no profile. |
|
|
35
35
|
| `mr-data receipt` | Print what one run recorded about how it was built: every source it fetched and what those bytes hashed to, the coverage it delivered, and the members of its raw snapshot. |
|
|
36
36
|
| `mr-data checks` | Report how each check the recipe declared came out — the name, whether it passed, what it found. Exits non-zero when one did not pass. |
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
# Prepare table search
|
|
2
|
+
|
|
3
|
+
This page takes a new table from declared columns to fast, well-ranked search. Studio does the
|
|
4
|
+
work. No model, index or database runs on this computer. Every verb has its own help, for
|
|
5
|
+
example `mr-data search validate --help`.
|
|
6
|
+
|
|
7
|
+
The steps below build search at the level of a dedicated search site: typo-tolerant titles,
|
|
8
|
+
person and brand lookups, category words that become filters, sort words that become sorts,
|
|
9
|
+
meaning-based retrieval over descriptions, and a planner that turns a sentence into a plan.
|
|
10
|
+
|
|
11
|
+
## The verbs
|
|
12
|
+
|
|
13
|
+
| Verb | What it does |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `search inspect --recipe FILE` | Probes whether the deployment serves search authoring. |
|
|
16
|
+
| `search propose --recipe FILE` | Returns a starter spec. It never edits the file. |
|
|
17
|
+
| `search validate` | Checks a spec and its evaluation cases against the pinned Studio contract, then asks Studio. |
|
|
18
|
+
| `search locate` | Turns a title, a year or an id into the `[part, row]` locator an evaluation case needs. |
|
|
19
|
+
| `search configure` | Stores a draft revision of the spec, with its evaluation cases. |
|
|
20
|
+
| `search build` | Queues a search build for a sealed version, or for one revision with `--revision`. |
|
|
21
|
+
| `search status` | Reports package readiness, job progress and the failure reason. |
|
|
22
|
+
| `search try` | Runs one query against the table's live search and prints rows, plan and timings. |
|
|
23
|
+
| `search activate` | Switches the version's live search to a built generation. |
|
|
24
|
+
| `search rollback` | Switches back to an earlier generation. |
|
|
25
|
+
| `search explain` | Shows how Studio parses one query into filters and sorts. |
|
|
26
|
+
| `search cancel` | Cancels a search job. It never undoes a finished generation. |
|
|
27
|
+
|
|
28
|
+
Exit codes are stable. 0 means complete. 1 means failed or invalid. 3 means still running or
|
|
29
|
+
served by the fallback scan. 4 means ambiguous.
|
|
30
|
+
|
|
31
|
+
## 1. Check the capability
|
|
32
|
+
|
|
33
|
+
Probe the deployment before you add `table.search` to a recipe:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
mr-data search inspect --recipe recipe.json --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Read a refusal from stderr. Its `code` is the typed discriminator. Treat `THIN_NOT_FOUND` as
|
|
40
|
+
missing search support only when `error` begins with
|
|
41
|
+
`Studio has no such resource for /v4/search/recipe-inspection`. Treat
|
|
42
|
+
`THIN_SEARCH_CAPABILITY_UNAVAILABLE` as a capability limit too. Any other refusal is not
|
|
43
|
+
capability evidence. That includes 401, 403, 429, timeouts and invalid responses. Resolve it.
|
|
44
|
+
|
|
45
|
+
When the brief does not mention search, search is optional only while the capability is missing.
|
|
46
|
+
Then omit `table.search`, keep the drafted intent beside the recipe, and record the limit in the
|
|
47
|
+
dataset's Sources and decisions note. Never put that limit in the description, title or topics.
|
|
48
|
+
When the user explicitly requires semantic retrieval or the planner, do not register a recipe
|
|
49
|
+
without it. Report the limit and wait.
|
|
50
|
+
|
|
51
|
+
## 2. Choose keyword and semantic columns
|
|
52
|
+
|
|
53
|
+
Keyword columns feed the lexical index. They give exact and typo-tolerant word matches. Use them
|
|
54
|
+
for titles, names, people, brands, keywords and tags. The cap is 16 columns. Each must be a
|
|
55
|
+
declared `string` or `json` column.
|
|
56
|
+
|
|
57
|
+
Semantic columns feed meaning-based retrieval. Use them for prose that a user paraphrases: a
|
|
58
|
+
title and a plot, a product description, an abstract. The cap is 16. Keep identifiers,
|
|
59
|
+
measurements, dates and short codes out of them. Embeddings run on the hosted worker with a pinned
|
|
60
|
+
multilingual model. Private table text does not leave the platform for them.
|
|
61
|
+
|
|
62
|
+
A table with no useful prose keeps `semantic_columns` empty. A semantic-only table may keep
|
|
63
|
+
`keyword_columns` empty. Its lexical capability then stays `unavailable`.
|
|
64
|
+
|
|
65
|
+
## 3. Fill the field roles
|
|
66
|
+
|
|
67
|
+
`field_roles` tells search what each column means. The ranking and the planner use it.
|
|
68
|
+
|
|
69
|
+
| Role | Column type | Use |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| `title` | string | The name people type. It gets typo correction and the strongest boost. |
|
|
72
|
+
| `person` | string | People. A query that names a person filters on this column. |
|
|
73
|
+
| `brand` | string | Companies, studios, labels or makers. |
|
|
74
|
+
| `category` | string | The main category, such as `genres`. |
|
|
75
|
+
| `language`, `country` | string | Language and country codes or names. |
|
|
76
|
+
| `date` | date, timestamp or integer | Release or event date. Decade words use it. |
|
|
77
|
+
| `popularity`, `votes`, `rating` | integer, decimal or float | Tie-breaks and "best" or "most popular" sorts. |
|
|
78
|
+
| `identifier` | any | The row's own id. `search locate --id` uses it. |
|
|
79
|
+
| `description` | any | The main prose column. |
|
|
80
|
+
| `image` | any | A poster or thumbnail URL for result cards. |
|
|
81
|
+
| `emoji` | string | Each row's emojis. A query emoji finds the rows that carry it, and a word such as "shark" finds the rows that carry its emoji. |
|
|
82
|
+
|
|
83
|
+
Set a role to `null` or leave it out when no column fits. Never point a role at a column of
|
|
84
|
+
another type. Studio refuses it.
|
|
85
|
+
|
|
86
|
+
## 4. Add derived text columns past the 16-column cap
|
|
87
|
+
|
|
88
|
+
A wide table often has more searchable text than 16 columns. Fold related columns into one derived
|
|
89
|
+
column in the recipe's transform. A movie table might fold director, cast, creators and writers
|
|
90
|
+
into `people_text`. It might fold keywords, tagline, companies, networks and franchise into
|
|
91
|
+
`meta_text`. Read [transforms](transforms.md) for the grammar. A transform step can write:
|
|
92
|
+
|
|
93
|
+
```sql
|
|
94
|
+
select *,
|
|
95
|
+
concat_ws(' ', director, cast_top10, created_by, writers) as people_text,
|
|
96
|
+
concat_ws(' ', keywords, tagline, production_companies, networks, franchise) as meta_text
|
|
97
|
+
from movies
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Then list `people_text` and `meta_text` in `keyword_columns`, and point the `person` role at
|
|
101
|
+
`people_text` when no single person column covers everyone. Describe each derived column in its
|
|
102
|
+
column description.
|
|
103
|
+
|
|
104
|
+
## 5. Declare display, filter, sort and soft columns
|
|
105
|
+
|
|
106
|
+
- `display_columns` (1 to 16) are the columns a result row carries. Include the title, the date,
|
|
107
|
+
the identifier and the image. `search try` and `search locate` read these columns. Without
|
|
108
|
+
`display_columns`, a package shows the identifier, the title and the keyword columns.
|
|
109
|
+
- `filterable_columns` (up to 64) are the columns a plan may filter on. Include categories,
|
|
110
|
+
languages, dates and numbers. Every field-role column is filterable too.
|
|
111
|
+
- `sortable_columns` are the columns a plan may sort on. Include popularity, rating, vote count,
|
|
112
|
+
date and money columns.
|
|
113
|
+
- `soft_preference_columns` (up to 16, string only) are moods and tones. A match moves a row up and
|
|
114
|
+
never filters it out.
|
|
115
|
+
- `soft_preference_sets` joins columns that hold the same preference, such as `mood_1` and
|
|
116
|
+
`mood_2`. Each key is a `soft_preference_columns` entry. Its value lists 1 to 7 other string
|
|
117
|
+
columns. A row matches when any column of the set holds the value. Up to 16 sets.
|
|
118
|
+
- `multi_value_columns` (up to 16, string only) are columns whose cells are comma-separated lists,
|
|
119
|
+
such as genres `"Action, Comedy"`. Each trimmed item is a filter value. In a
|
|
120
|
+
`table-search-package.v2` package, `eq`, `in` and `ne` compare against the items, and the value
|
|
121
|
+
list shows items, not whole cells. Give such a column `eq` aliases.
|
|
122
|
+
|
|
123
|
+
## 6. Add aliases for categories
|
|
124
|
+
|
|
125
|
+
An alias maps a phrase to an exact filter. Use one for each category value a user says in words:
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{"phrase": "horror", "column": "genres", "operator": "eq", "value": "Horror"}
|
|
129
|
+
{"phrase": "tv show", "column": "media_type", "operator": "eq", "value": "tv"}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Phrases are unique and casefolded. Take the values from the built table with `mr-data query`, not
|
|
133
|
+
from documentation. Ordered comparisons need a numeric or date column. `contains` needs a text
|
|
134
|
+
column. Decimal values travel as strings. Never invent a meaning such as "best" when the brief
|
|
135
|
+
does not name a metric. Leave that word unresolved, or add an explicit alias such as
|
|
136
|
+
"highest rated".
|
|
137
|
+
|
|
138
|
+
## 7. Add sort aliases
|
|
139
|
+
|
|
140
|
+
A sort alias maps a phrase to a sort:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{"phrase": "most popular", "column": "popularity", "direction": "desc"}
|
|
144
|
+
{"phrase": "newest", "column": "release_date", "direction": "desc"}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 8. Turn the planner on for public tables
|
|
148
|
+
|
|
149
|
+
The planner turns a sentence into filters, sorts and preferences. Set
|
|
150
|
+
`"planner": {"enabled": true, "external_context_allowed": true}` on a public table. Keep
|
|
151
|
+
`external_context_allowed` false on a private table unless the user or the workspace policy
|
|
152
|
+
authorizes sending its context to the planner model. Data-read permission is not that consent.
|
|
153
|
+
Queries with negation or "or" stay unresolved rather than becoming a guessed filter.
|
|
154
|
+
|
|
155
|
+
A full spec looks like this:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"schema_version": "table-search-spec.v1",
|
|
160
|
+
"keyword_columns": ["title", "original_title", "overview", "people_text", "meta_text"],
|
|
161
|
+
"semantic_columns": ["title", "overview"],
|
|
162
|
+
"aliases": [{"phrase": "horror", "column": "genres", "operator": "eq", "value": "Horror"}],
|
|
163
|
+
"sort_aliases": [{"phrase": "most popular", "column": "popularity", "direction": "desc"}],
|
|
164
|
+
"planner": {"enabled": true, "external_context_allowed": true},
|
|
165
|
+
"field_roles": {"title": "title", "person": "people_text", "date": "release_date",
|
|
166
|
+
"popularity": "popularity", "rating": "vote_average", "identifier": "id",
|
|
167
|
+
"description": "overview", "category": "genres", "image": "poster_url",
|
|
168
|
+
"emoji": "emojis"},
|
|
169
|
+
"display_columns": ["id", "title", "release_date", "poster_url", "overview"],
|
|
170
|
+
"filterable_columns": ["id", "genres", "original_language", "release_date", "runtime"],
|
|
171
|
+
"sortable_columns": ["popularity", "vote_average", "vote_count", "release_date"],
|
|
172
|
+
"soft_preference_columns": ["mood_1"],
|
|
173
|
+
"soft_preference_sets": {"mood_1": ["mood_2"]},
|
|
174
|
+
"multi_value_columns": ["genres"]
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Put it in the recipe as `table.search`.
|
|
179
|
+
|
|
180
|
+
## 9. Validate
|
|
181
|
+
|
|
182
|
+
Validate before you register anything:
|
|
183
|
+
|
|
184
|
+
```sh
|
|
185
|
+
mr-data search validate --spec search.json --json
|
|
186
|
+
mr-data search validate --recipe recipe.json --json
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
`--spec` alone checks the file against the pinned Studio contract and sends nothing. `--recipe`
|
|
190
|
+
checks `table.search` the same way, then asks Studio to check it against the declared columns.
|
|
191
|
+
`configure` runs the same local check. When Studio serves a newer spec member than this client
|
|
192
|
+
knows, pass `configure --no-local-check` and let Studio decide.
|
|
193
|
+
Studio also checks the column types: a `multi_value_columns` entry, an `emoji` role and every
|
|
194
|
+
column of a soft preference set must name a declared string column.
|
|
195
|
+
The `local` block lists each refusal with a JSON pointer. Repair every diagnostic, then run
|
|
196
|
+
`mr-data recipe recipe.json --json` as usual.
|
|
197
|
+
|
|
198
|
+
## 10. Build the data and watch search prepare
|
|
199
|
+
|
|
200
|
+
Register and build the table as usual. A finished build of a table with `table.search` prepares
|
|
201
|
+
search in the background. Data publication never waits for it. The live search package that
|
|
202
|
+
`search try` uses exists only for a table published publicly. Read the version ID from the run
|
|
203
|
+
receipt, then check readiness:
|
|
204
|
+
|
|
205
|
+
```sh
|
|
206
|
+
mr-data search status TABLE_ID --version VERSION_ID --json
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
`readiness` summarises the answer:
|
|
210
|
+
|
|
211
|
+
- `preparation_state` is `ready` when a generation serves this spec.
|
|
212
|
+
- `reason` says why not: `never_built`, `pending`, `failed`, `cancelled`, `not_activated` or
|
|
213
|
+
`spec_mismatch`. It is null while a job is dispatched, and when the version has no search spec.
|
|
214
|
+
- `progress_rows`, `total_rows` and `percent` track a running build.
|
|
215
|
+
- `failure` names the cause of a failed build.
|
|
216
|
+
- `package_state` and `package_reason` describe the live search package that `search try` uses.
|
|
217
|
+
- `generation_id` and `active_revision_id` are the coordinates `search activate` compares.
|
|
218
|
+
|
|
219
|
+
Exit code 0 means a generation serves the spec. Exit code 3 means not ready yet: a build is
|
|
220
|
+
running, or the version needs a build or an activation. Read `reason` before you wait.
|
|
221
|
+
`never_built`, `not_activated` and `spec_mismatch` need an action, not time. Exit code 1 means the build failed or was cancelled. Never queue
|
|
222
|
+
a duplicate build while one runs. A failed build leaves the data published. Never call a table
|
|
223
|
+
partly ready.
|
|
224
|
+
|
|
225
|
+
## 11. Try queries
|
|
226
|
+
|
|
227
|
+
Run real queries against the live search once `package_state` is `ready`:
|
|
228
|
+
|
|
229
|
+
```sh
|
|
230
|
+
mr-data search try TABLE_ID --public-table PUBLIC_TABLE_ID --query "incepton" --json
|
|
231
|
+
mr-data search try TABLE_ID --public-table PUBLIC_TABLE_ID --query "90s horror twist ending" --json
|
|
232
|
+
mr-data search try TABLE_ID --public-table PUBLIC_TABLE_ID --plan plan.json --columns title --json
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
`TABLE_ID` is the Studio table ID from the run receipt. `PUBLIC_TABLE_ID` is the table's public
|
|
236
|
+
ID, which `mr-data public tables DATASET_SLUG --json` lists. `try` refuses with
|
|
237
|
+
`THIN_SEARCH_VERSION_MISMATCH` when the two do not serve the same live version. The public schema
|
|
238
|
+
can lag a new live version by a few minutes. Retry then. A query holds at most 16 words.
|
|
239
|
+
|
|
240
|
+
`try` prints the rows, the applied `plan`, the `planner` report, the `retrieval` mode, the
|
|
241
|
+
`corrected` query after a typo fix, the service stage timings and the Cloud timings. `path: scan`
|
|
242
|
+
means the package did not answer and the fallback scan did. The `note` says why. Fix that before
|
|
243
|
+
you judge ranking. `try` runs on published tables only, against their live version.
|
|
244
|
+
|
|
245
|
+
Check each kind of query the table should answer: an exact title, a misspelled title, a person, a
|
|
246
|
+
brand, a category word, a decade, a sort word, and a plot paraphrase. Record a few checks with
|
|
247
|
+
their actual results in the dataset's verification notes.
|
|
248
|
+
|
|
249
|
+
## 12. Write evaluation cases
|
|
250
|
+
|
|
251
|
+
A spec with semantic columns needs evaluation cases before a revision can activate. Each case is
|
|
252
|
+
one query and the rows it must or must not return in its top `top_k`. You need at least one
|
|
253
|
+
`paraphrase` case and one `hard_negative` case.
|
|
254
|
+
|
|
255
|
+
- A paraphrase case describes a row without its title words: "thieves who steal secrets inside
|
|
256
|
+
dreams" must find Inception.
|
|
257
|
+
- A hard-negative case names rows that look close but are wrong. It needs at least one forbidden
|
|
258
|
+
row: "a heist inside dreams" must not return a documentary about sleep.
|
|
259
|
+
|
|
260
|
+
The evaluator runs each query through meaning-based retrieval alone, with no filters. Write
|
|
261
|
+
queries that meaning can answer.
|
|
262
|
+
|
|
263
|
+
Cases name rows by `[part_index, row]` locators of the sealed version. Draft them by title or id,
|
|
264
|
+
then let `locate` resolve them:
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
{"cases": [
|
|
268
|
+
{"case_id": "dream-heist", "kind": "paraphrase", "top_k": 10,
|
|
269
|
+
"query": "thieves who steal secrets inside dreams",
|
|
270
|
+
"required": [{"title": "Inception", "year": 2010}], "forbidden": []},
|
|
271
|
+
{"case_id": "not-a-documentary", "kind": "hard_negative", "top_k": 10,
|
|
272
|
+
"query": "a heist inside dreams",
|
|
273
|
+
"required": [{"title": "Inception", "year": 2010}], "forbidden": [{"id": 12345}]}
|
|
274
|
+
]}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
```sh
|
|
278
|
+
mr-data search locate TABLE_ID --public-table PUBLIC_TABLE_ID --cases draft.json --out cases.json --json
|
|
279
|
+
mr-data search locate TABLE_ID --public-table PUBLIC_TABLE_ID --title "Dune" --year 2021 --json
|
|
280
|
+
mr-data search locate TABLE_ID --public-table PUBLIC_TABLE_ID --id 27205 --json
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
`locate` reads the public table's rows and maps each matching row to its locator. It needs no
|
|
284
|
+
search package, so write the cases before the version has one. The table must be published
|
|
285
|
+
publicly with its preview on. It reads the title, date and identifier columns from the field
|
|
286
|
+
roles. Override them with `--title-column`, `--date-column` and `--id-column`. A title matches
|
|
287
|
+
exactly, with the same case and spacing as the cell. A year matches the start of the date
|
|
288
|
+
column's value. A title without a year can match several rows. `locate` then lists them all and
|
|
289
|
+
exits 4. Add the year or use the id. It writes `--out` only when every target resolved and the
|
|
290
|
+
cases meet the contract.
|
|
291
|
+
|
|
292
|
+
Locators belong to one sealed version. `locate` resolves rows of the live version only. Configure
|
|
293
|
+
the cases on that same version. A later version has a different row layout, so locate again after
|
|
294
|
+
a rebuild. Check the result:
|
|
295
|
+
|
|
296
|
+
```sh
|
|
297
|
+
mr-data search validate TABLE_ID --version VERSION_ID --spec search.json --cases cases.json --json
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
This checks the cases against the contract and every locator against the version's parts.
|
|
301
|
+
|
|
302
|
+
## 13. Configure, build and activate a revision
|
|
303
|
+
|
|
304
|
+
A revision changes search on a sealed version without a data rebuild. Use one to add evaluation
|
|
305
|
+
cases or to tune the spec.
|
|
306
|
+
|
|
307
|
+
```sh
|
|
308
|
+
mr-data search configure TABLE_ID --version VERSION_ID --spec search.json \
|
|
309
|
+
--cases cases.json --expected-revision none --json
|
|
310
|
+
mr-data search build TABLE_ID --version VERSION_ID --revision REVISION_ID --json
|
|
311
|
+
mr-data search status --job JOB_ID --json
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Leave out `--spec` to declare the `table.search` spec of the recipe that sealed the version.
|
|
315
|
+
Use that to add evaluation cases without retyping the spec. Without `--spec` the client cannot
|
|
316
|
+
check locally that semantic cases include a paraphrase and a hard negative. Studio checks them
|
|
317
|
+
against the recipe's spec. A recipe with no `table.search` answers 409 `SEARCH_NOT_CONFIGURED`.
|
|
318
|
+
`search status --job` reads any search job: the build, its package and embed steps, the
|
|
319
|
+
evaluator and a title job. A job still `queued`, `dispatched` or `running` exits 3.
|
|
320
|
+
`--expected-revision` is the current draft from `search status` (`selected_draft_revision_id`),
|
|
321
|
+
or `none`. Reuse `--idempotency-key` only to retry the same configuration. When the job succeeds,
|
|
322
|
+
`search status TABLE_ID --version VERSION_ID --revision REVISION_ID` reports `not_activated` and
|
|
323
|
+
the new `generation_id`. A semantic revision also runs the evaluator. Activation needs its
|
|
324
|
+
measurements to pass.
|
|
325
|
+
|
|
326
|
+
```sh
|
|
327
|
+
mr-data search activate TABLE_ID --version VERSION_ID --revision REVISION_ID \
|
|
328
|
+
--generation GENERATION_ID --expected-active none \
|
|
329
|
+
--expected-active-generation none --json
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
The two `--expected-active` values are the revision and generation that serve now, from
|
|
333
|
+
`search status`. Use `none` when nothing serves. Studio refuses the switch when they changed.
|
|
334
|
+
Activation changes search only. It never changes which data version is live. Use `rollback` with
|
|
335
|
+
the same coordinates to switch back. `--revision none` names the recipe's own spec.
|
|
336
|
+
|
|
337
|
+
## 14. Query a published table directly
|
|
338
|
+
|
|
339
|
+
`search try` wraps the public query route. You can call it yourself. Read the schema first:
|
|
340
|
+
|
|
341
|
+
```sh
|
|
342
|
+
mr-data public schema PUBLIC_TABLE_ID --json
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
`capabilities.search` carries `table_version_id`, `spec_digest`, `keyword_columns` and
|
|
346
|
+
`semantic_columns`. Use `keyword_columns` for `search.columns`. The top-level `columns` is the
|
|
347
|
+
output projection. This example uses an illustrative digest:
|
|
348
|
+
|
|
349
|
+
```sh
|
|
350
|
+
mr-data public query PUBLIC_TABLE_ID --body '{"columns":["title"],"search":{"text":"example","columns":["title"],"spec_digest":"sha256:0000000000000000000000000000000000000000000000000000000000000000","mode":"lexical"},"limit":10}' --json
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
Add `"engine": "resident"` and `"settled": true` to `search` to use the live package, as `try`
|
|
354
|
+
does. Public query prints Cloud stage durations under `result.timings`, the HTTP status and the
|
|
355
|
+
request ID. Keep a refusal's `detail` with its request ID.
|
|
356
|
+
|
|
357
|
+
## Rules
|
|
358
|
+
|
|
359
|
+
- Never emulate search locally, and never claim readiness from a declaration.
|
|
360
|
+
- Never compute authoritative digests or bypass Studio's resource admission.
|
|
361
|
+
- Source cells and model output stay untrusted.
|
|
362
|
+
- This workflow opts in new tables. It does not migrate old datasets or rewrite a user's recipe.
|