mammoth-cli 2.2.48__tar.gz → 2.2.50__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.
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/PKG-INFO +2 -2
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/__init__.py +1 -1
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/command-index.md +3 -3
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dashboard.md +10 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/view.md +30 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/dashboard.py +34 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/registry.py +4 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/schema.py +14 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/view.py +57 -8
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/view_ops.py +69 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/errors/envelope.py +1 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/command_contract.py +19 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/data_quality.py +42 -14
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/input_fields.py +12 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/positionals.py +10 -0
- mammoth_cli-2.2.50/mammoth_cli/services/view_variants.py +164 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/pyproject.toml +2 -2
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/dashboard.yaml +52 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/view.yaml +147 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/edits-target.source.yaml +2 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/sdk-catalog.source.yaml +21 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/sdk-methods.yaml +37 -1
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/.gitignore +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/LICENSE +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/README.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/__main__.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/app.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/SKILL.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/about-mammoth.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/auth.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/capabilities-misc.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/capabilities.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/activity.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/addon.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/agent.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/ai.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/annotation.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/auth.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/automation.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/batch.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/billing.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/browse.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/calc.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/capability.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/client-app.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/completion.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/config.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/connector.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/context.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dashboard-qa.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dashboard-style.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dashboard-template.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/data-app.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dataset.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/doctor.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/external-key.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/file.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/folder.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/job.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/link.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/log.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/notification.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/parameter.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/project.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/report.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/resolve.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/schedule.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/schema.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/skill.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/snippet.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/support.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/template.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/token.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/trash.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/upgrade.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/user.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/version.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/view-transform.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/webhook.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/workflow.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/workspace.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/handoff.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/input.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/jobs-drafts.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/machine-output.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/operations.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/auth-scope.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/cleanup.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/dashboards.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/database-import.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/end-to-end.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/exports.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/index.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/need-action.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/resources.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/scheduling.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/transforms.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/typed-etl-discovery.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/recovery.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/report-checklist.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/retention.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/safety.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/bundled_skill/mammoth-cli/references/task-start.md +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/__init__.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/activity.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/addon.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/agent.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/ai.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/annotation.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/auth.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/automation.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/batch.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/billing.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/browse.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/calc.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/capability.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/client_app.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/completion.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/config.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/connector.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/context.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/data_app.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/dataset.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/doctor.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/external_key.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/file.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/folder.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/job.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/link.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/notification.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/parameter.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/project.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/report.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/resolve.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/schedule.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/skill.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/snippet.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/support.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/template.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/trash.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/upgrade.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/user.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/view_profile.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/webhook.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/workflow.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/commands/workspace.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/context/__init__.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/context/credentials.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/context/endpoint.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/context/oauth.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/context/profiles.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/context/resolver.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/contracts/__init__.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/contracts/auth.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/embed.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/errors/__init__.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/manifest/__init__.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/manifest/loader.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/messages/__init__.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/output/__init__.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/output/envelope.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/output/normalize.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/output/policy.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/output/progress.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/output/render.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/py.typed +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/__init__.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/confirm.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/dataset_health.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/dryrun.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/dryrun_targets.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/embedded.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/executor.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/input_loader.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/intent_only.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/invocation.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/locked_files.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/new_data.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/options.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/parents.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/runlog.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/session.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/state.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/strict.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/updates.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/validate.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/runtime/verify.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/__init__.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/append_blank_columns.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/argspec.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/board_values.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/coerce.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/conditional_format.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/conditions.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/dashboard_filters.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/dashboard_pages.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/dashboard_review.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/data_profile.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/dispatch.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/factory.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/job_outcome.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/listing.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/local_time.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/mapping.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/openapi_types.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/protocol.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/read_queries.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/sdk_service.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/sql_check.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/stored_stats.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/testing.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/text_dates.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/type_system.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/view_analysis.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/services/write_impact.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/skills/__init__.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/skills/installer.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/skills/steering.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/mammoth_cli/testing.py +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/activity.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/addon.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/agent.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/ai.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/annotation.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/auth.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/automation.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/batch.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/billing.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/browse.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/calc.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/capability.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/client-app.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/completion.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/config.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/connector.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/context.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/data-app.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/dataset.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/doctor.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/external-key.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/file.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/folder.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/job.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/link.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/log.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/notification.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/parameter.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/project.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/report.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/resolve.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/schedule.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/schema.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/skill.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/snippet.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/support.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/template.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/token.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/trash.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/upgrade.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/user.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/version.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/webhook.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/workflow.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/commands/workspace.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/openapi-operations.yaml +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/manifests/schema-v1.json +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/openapi/metadata.json +0 -0
- {mammoth_cli-2.2.48 → mammoth_cli-2.2.50}/spec/openapi/openapi.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mammoth-cli
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.50
|
|
4
4
|
Summary: Command-line interface for the Mammoth Analytics platform
|
|
5
5
|
Project-URL: homepage, https://mammoth.io
|
|
6
6
|
Project-URL: repository, https://github.com/EdgeMetric/mammothsdk
|
|
@@ -17,7 +17,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
17
17
|
Requires-Python: <3.15,>=3.12
|
|
18
18
|
Requires-Dist: jsonschema>=4.20
|
|
19
19
|
Requires-Dist: keyring<26,>=25.7
|
|
20
|
-
Requires-Dist: mammoth-io<0.9,>=0.8.
|
|
20
|
+
Requires-Dist: mammoth-io<0.9,>=0.8.27
|
|
21
21
|
Requires-Dist: platformdirs<5,>=4.10
|
|
22
22
|
Requires-Dist: pydantic<3,>=2.12.5
|
|
23
23
|
Requires-Dist: pyyaml<7,>=6
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Published CLI command catalog
|
|
2
2
|
|
|
3
|
-
This generated catalog is a lookup table for every command in the published CLI manifest, currently
|
|
3
|
+
This generated catalog is a lookup table for every command in the published CLI manifest, currently 660; each entry carries its release status line. It is a command-contract index, not an assertion that every backend/OpenAPI operation has a CLI binding. For an exact local CLI contract, run `mammoth schema get COMMAND_ID`; `mammoth capability list` is an API-binding inventory and can omit typed/local CLI routes. For focused workflows, read the [recipes index](recipes/index.md). Sensitive structured input must come from a private file or pipe; never put secrets in literal argv.
|
|
4
4
|
|
|
5
5
|
Load only the applicable domain file:
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ Load only the applicable domain file:
|
|
|
24
24
|
- [dashboard-qa](commands/dashboard-qa.md) — 14 published commands
|
|
25
25
|
- [dashboard-template](commands/dashboard-template.md) — 12 published commands
|
|
26
26
|
- [dashboard-style](commands/dashboard-style.md) — 10 published commands
|
|
27
|
-
- [dashboard](commands/dashboard.md) —
|
|
27
|
+
- [dashboard](commands/dashboard.md) — 99 published commands
|
|
28
28
|
- [data-app](commands/data-app.md) — 12 published commands
|
|
29
29
|
- [dataset](commands/dataset.md) — 22 published commands
|
|
30
30
|
- [doctor](commands/doctor.md) — 1 published commands
|
|
@@ -51,7 +51,7 @@ Load only the applicable domain file:
|
|
|
51
51
|
- [user](commands/user.md) — 8 published commands
|
|
52
52
|
- [version](commands/version.md) — 1 published commands
|
|
53
53
|
- [view-transform](commands/view-transform.md) — 32 published commands
|
|
54
|
-
- [view](commands/view.md) —
|
|
54
|
+
- [view](commands/view.md) — 97 published commands
|
|
55
55
|
- [webhook](commands/webhook.md) — 7 published commands
|
|
56
56
|
- [workflow](commands/workflow.md) — 16 published commands
|
|
57
57
|
- [workspace](commands/workspace.md) — 26 published commands
|
|
@@ -422,6 +422,16 @@ Result: `DashboardFigureIntentResult`; mutation `benign_mutation`, confirmation
|
|
|
422
422
|
|
|
423
423
|
Status on release: ran once on CLI 2.0.14 — dashboard re-verification 2026-09-18: exit 0 on release with CLI 2.0.14. CLI defect fixed, confirmed: returned a full matched structured body ({"added":{...},"kind":"bar","spec":{...},"intentApplied":true,...}) instead of raising ValidationError on an unmatch…
|
|
424
424
|
|
|
425
|
+
### `dashboard.figure.add`
|
|
426
|
+
|
|
427
|
+
Run: `mammoth dashboard figure add`. Exact input fields: `mammoth schema get dashboard.figure.add`.
|
|
428
|
+
|
|
429
|
+
Example: `mammoth dashboard figure add 123 --input '{"dataview_id": 1, "figure": {"kind": "hbar", "title": "Revenue by region", "dim": "Region", "measure": "Revenue", "agg": "sum"}}'`. Placeholders are illustrative; resolve IDs and input from observed reads.
|
|
430
|
+
|
|
431
|
+
Result: `DashboardFigureAddResult`; mutation `benign_mutation`, confirmation `none`, wait policy `not_async`.
|
|
432
|
+
|
|
433
|
+
Status on release: untried; no live run recorded.
|
|
434
|
+
|
|
425
435
|
### `dashboard.filter.add`
|
|
426
436
|
|
|
427
437
|
Run: `mammoth dashboard filter add`. Exact input fields: `mammoth schema get dashboard.filter.add`.
|
|
@@ -412,6 +412,26 @@ Result: `ViewDraftSubmitResult`; mutation `reversible_pipeline`, confirmation `n
|
|
|
412
412
|
|
|
413
413
|
Status on release: untried; no live run recorded.
|
|
414
414
|
|
|
415
|
+
### `view.explore-panel.get`
|
|
416
|
+
|
|
417
|
+
Run: `mammoth view explore-panel get`. Exact input fields: `mammoth schema get view.explore-panel.get`.
|
|
418
|
+
|
|
419
|
+
Example: `mammoth view explore-panel get 123`. Placeholders are illustrative; resolve IDs and input from observed reads.
|
|
420
|
+
|
|
421
|
+
Result: `ViewExplorePanelGetResult`; mutation `read`, confirmation `none`, wait policy `not_async`.
|
|
422
|
+
|
|
423
|
+
Status on release: untried; no live run recorded.
|
|
424
|
+
|
|
425
|
+
### `view.explore-panel.set`
|
|
426
|
+
|
|
427
|
+
Run: `mammoth view explore-panel set`. Exact input fields: `mammoth schema get view.explore-panel.set`.
|
|
428
|
+
|
|
429
|
+
Example: `mammoth view explore-panel set 123 --input '{"panel": {"open": true, "items": [{"column": "column_1", "renderType": "chart"}]}}'`. Placeholders are illustrative; resolve IDs and input from observed reads.
|
|
430
|
+
|
|
431
|
+
Result: `ViewExplorePanelSetResult`; mutation `benign_mutation`, confirmation `none`, wait policy `not_async`.
|
|
432
|
+
|
|
433
|
+
Status on release: untried; no live run recorded.
|
|
434
|
+
|
|
415
435
|
### `view.export.azure-blob`
|
|
416
436
|
|
|
417
437
|
Run: `mammoth view export azure-blob`. Exact input fields: `mammoth schema get view.export.azure-blob`.
|
|
@@ -914,6 +934,16 @@ Result: `ViewUpdateResult`; mutation `benign_mutation`, confirmation `none`, wai
|
|
|
914
934
|
|
|
915
935
|
Status on release: untried; no live run recorded.
|
|
916
936
|
|
|
937
|
+
### `view.variants.create`
|
|
938
|
+
|
|
939
|
+
Run: `mammoth view variants create`. Exact input fields: `mammoth schema get view.variants.create`.
|
|
940
|
+
|
|
941
|
+
Example: `mammoth view variants create 123 --input '{"from_view": 456, "column": "Region", "values": ["East", "West"]}'`. Placeholders are illustrative; resolve IDs and input from observed reads.
|
|
942
|
+
|
|
943
|
+
Result: `ViewVariantsCreateResult`; mutation `benign_mutation`, confirmation `none`, wait policy `always_wait`.
|
|
944
|
+
|
|
945
|
+
Status on release: untried; no live run recorded.
|
|
946
|
+
|
|
917
947
|
### `view.version.apply`
|
|
918
948
|
|
|
919
949
|
Run: `mammoth view version apply`. Exact input fields: `mammoth schema get view.version.apply`.
|
|
@@ -608,6 +608,40 @@ def dashboard_share(invocation: Invocation) -> HandlerResult:
|
|
|
608
608
|
return data, _meta(invocation, auth.workspace_id)
|
|
609
609
|
|
|
610
610
|
|
|
611
|
+
def _figure_page_kwargs(page: Any) -> dict[str, Any]:
|
|
612
|
+
"""Map the endpoint's ``page`` ({"id"} or {"new_title"}) onto the SDK's page arguments."""
|
|
613
|
+
if not isinstance(page, dict) or set(page) not in ({"id"}, {"new_title"}):
|
|
614
|
+
raise CliError(
|
|
615
|
+
code=CODE_INVALID_ARGUMENT,
|
|
616
|
+
message='The \'page\' input field must be {"id": ...} or {"new_title": ...}.',
|
|
617
|
+
exit_status=EXIT_USAGE,
|
|
618
|
+
)
|
|
619
|
+
if "id" in page:
|
|
620
|
+
return {"page_id": page["id"]}
|
|
621
|
+
return {"page_new_title": page["new_title"]}
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
def dashboard_figure_add(invocation: Invocation) -> HandlerResult:
|
|
625
|
+
"""Add one figure to a dashboard. The input is the endpoint's own shape.
|
|
626
|
+
|
|
627
|
+
``dataview_id`` and ``figure`` are required; ``banded`` and ``page`` (``{"id": ...}``
|
|
628
|
+
or ``{"new_title": ...}``) are optional. The result carries ``bake_job_id``.
|
|
629
|
+
"""
|
|
630
|
+
dashboard_id = _require_int_positional(invocation, "dashboard id")
|
|
631
|
+
document = _bound_document(invocation)
|
|
632
|
+
kwargs: dict[str, Any] = {
|
|
633
|
+
"dashboard_id": dashboard_id,
|
|
634
|
+
"dataview_id": _require_field(document, "dataview_id"),
|
|
635
|
+
"figure": _require_field(document, "figure"),
|
|
636
|
+
}
|
|
637
|
+
_forward_optional(document, kwargs, ("banded",))
|
|
638
|
+
if document.get("page") is not None:
|
|
639
|
+
kwargs.update(_figure_page_kwargs(document["page"]))
|
|
640
|
+
with open_service(invocation) as (service, auth):
|
|
641
|
+
data = service.call(_symbol(invocation), **kwargs)
|
|
642
|
+
return data, _meta(invocation, auth.workspace_id)
|
|
643
|
+
|
|
644
|
+
|
|
611
645
|
def dashboard_cancel_generation(invocation: Invocation) -> HandlerResult:
|
|
612
646
|
"""Cancel an in-progress dashboard generation."""
|
|
613
647
|
dashboard_id = _require_int_positional(invocation, "dashboard id")
|
|
@@ -483,6 +483,7 @@ HANDLERS: dict[str, Handler] = {
|
|
|
483
483
|
"dashboard.tags.merge": dashboard_cmd.dashboard_tags_merge,
|
|
484
484
|
"dashboard.published-data-by-url": dashboard_cmd.dashboard_published_data_by_url,
|
|
485
485
|
"dashboard.restore": dashboard_cmd.dashboard_restore,
|
|
486
|
+
"dashboard.figure.add": dashboard_cmd.dashboard_figure_add,
|
|
486
487
|
"dashboard.share": dashboard_cmd.dashboard_share,
|
|
487
488
|
"dashboard.source.list": dashboard_cmd.dashboard_source_list,
|
|
488
489
|
"dashboard.trash": dashboard_cmd.dashboard_trash,
|
|
@@ -777,6 +778,8 @@ HANDLERS: dict[str, Handler] = {
|
|
|
777
778
|
"view.optimize": view_cmd.view_optimize,
|
|
778
779
|
"view.compare": view_cmd.view_compare,
|
|
779
780
|
"view.update": view_cmd.view_update,
|
|
781
|
+
"view.explore-panel.get": view_cmd.view_explore_panel_get,
|
|
782
|
+
"view.explore-panel.set": view_cmd.view_explore_panel_set,
|
|
780
783
|
"view.data.get": view_cmd.view_data_get,
|
|
781
784
|
"view.data.query": view_cmd.view_data_query,
|
|
782
785
|
"view.data.aggregate": view_cmd.view_data_aggregate_rounded,
|
|
@@ -852,6 +855,7 @@ HANDLERS: dict[str, Handler] = {
|
|
|
852
855
|
"view.export.tableau": view_cmd.view_export_specialized,
|
|
853
856
|
# view family (View-object: create/get/delete, draft, transforms)
|
|
854
857
|
"view.create": view_ops_cmd.view_create,
|
|
858
|
+
"view.variants.create": view_ops_cmd.view_variants_create,
|
|
855
859
|
"view.get": view_ops_cmd.view_get,
|
|
856
860
|
"view.delete": view_ops_cmd.view_delete,
|
|
857
861
|
"view.draft.enter": view_ops_cmd.view_draft_enter,
|
|
@@ -46,8 +46,17 @@ _PROTECTED_INPUT_PATH = "/private/path/request.json"
|
|
|
46
46
|
# second id, an optional-but-central input field, or two views to compare.
|
|
47
47
|
_FIXED_EXAMPLES: dict[str, tuple[tuple[str, ...], dict[str, Any]]] = {
|
|
48
48
|
"view.optimize": (("123",), {}),
|
|
49
|
+
"view.explore-panel.get": (("123",), {}),
|
|
50
|
+
"view.explore-panel.set": (
|
|
51
|
+
("123",),
|
|
52
|
+
{"panel": {"open": True, "items": [{"column": "column_1", "renderType": "chart"}]}},
|
|
53
|
+
),
|
|
49
54
|
"project.check": (("123", "456"), {}),
|
|
50
55
|
"view.data.profile": (("123",), {"target": "Churn"}),
|
|
56
|
+
"view.variants.create": (
|
|
57
|
+
("123",),
|
|
58
|
+
{"from_view": 456, "column": "Region", "values": ["East", "West"]},
|
|
59
|
+
),
|
|
51
60
|
"workflow.canvas": (
|
|
52
61
|
("12",),
|
|
53
62
|
{
|
|
@@ -97,6 +106,11 @@ _GROUP_DISCOVERY_PURPOSES = {
|
|
|
97
106
|
|
|
98
107
|
_COMMAND_DISCOVERY_PURPOSES = {
|
|
99
108
|
"view.update": "rename change name to a new name title relabel",
|
|
109
|
+
"view.explore-panel.get": "explore cards saved panel the data editor explore side panel read",
|
|
110
|
+
"view.explore-panel.set": "save replace explore cards panel items chart a column in the editor",
|
|
111
|
+
"dashboard.figure.add": (
|
|
112
|
+
"append an explore card figure tile to a dashboard from a payload, no chat turn"
|
|
113
|
+
),
|
|
100
114
|
"file.upload": (
|
|
101
115
|
"upload import CSV spreadsheet XLSX source data append add rows union stack "
|
|
102
116
|
"a file into an existing dataset excel workbook tabs sheets drop in"
|
|
@@ -1115,6 +1115,40 @@ def view_update(invocation: Invocation) -> HandlerResult:
|
|
|
1115
1115
|
return data, _meta(invocation, auth.workspace_id, project_id)
|
|
1116
1116
|
|
|
1117
1117
|
|
|
1118
|
+
def view_explore_panel_get(invocation: Invocation) -> HandlerResult:
|
|
1119
|
+
"""Read the Explore panel the caller saved on a view (empty when none is saved)."""
|
|
1120
|
+
project_id = require_project(invocation)
|
|
1121
|
+
dataview_id = _require_int_positional_at(invocation, 0, "view id")
|
|
1122
|
+
document = invocation.load_input() or {}
|
|
1123
|
+
with open_service(invocation) as (service, auth):
|
|
1124
|
+
dataset_id = _resolve_dataset_id(service, invocation, dataview_id, document)
|
|
1125
|
+
data = service.call(
|
|
1126
|
+
_symbol(invocation),
|
|
1127
|
+
dataset_id=dataset_id,
|
|
1128
|
+
dataview_id=dataview_id,
|
|
1129
|
+
project_id=project_id,
|
|
1130
|
+
)
|
|
1131
|
+
return data, _meta(invocation, auth.workspace_id, project_id)
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
def view_explore_panel_set(invocation: Invocation) -> HandlerResult:
|
|
1135
|
+
"""Replace the caller's saved Explore panel with the ``panel`` input field."""
|
|
1136
|
+
project_id = require_project(invocation)
|
|
1137
|
+
dataview_id = _require_int_positional_at(invocation, 0, "view id")
|
|
1138
|
+
document = invocation.load_input() or {}
|
|
1139
|
+
panel = _require_field(document, "panel")
|
|
1140
|
+
with open_service(invocation) as (service, auth):
|
|
1141
|
+
dataset_id = _verified_dataset_id(service, invocation, dataview_id, document)
|
|
1142
|
+
data = service.call(
|
|
1143
|
+
_symbol(invocation),
|
|
1144
|
+
dataset_id=dataset_id,
|
|
1145
|
+
dataview_id=dataview_id,
|
|
1146
|
+
panel=panel,
|
|
1147
|
+
project_id=project_id,
|
|
1148
|
+
)
|
|
1149
|
+
return data, _meta(invocation, auth.workspace_id, project_id)
|
|
1150
|
+
|
|
1151
|
+
|
|
1118
1152
|
def _untyped_patch_error(invocation: Invocation) -> CliError:
|
|
1119
1153
|
"""The refusal for a view patch that is not the typed rename."""
|
|
1120
1154
|
return CliError(
|
|
@@ -1513,19 +1547,32 @@ def _relabel_and_check(
|
|
|
1513
1547
|
rows = data.get(_ROWS_KEY) if isinstance(data, dict) else None
|
|
1514
1548
|
if not isinstance(rows, list) or not rows:
|
|
1515
1549
|
data = _relabel_columns(service, dataset_id, view_id, project_id, data, mapping)
|
|
1516
|
-
return _with_column_warnings(
|
|
1550
|
+
return _with_column_warnings(
|
|
1551
|
+
data, types or {}, view_id, dataset_id, read_only=True, project_id=project_id
|
|
1552
|
+
)
|
|
1517
1553
|
if mapping is None or types is None:
|
|
1518
1554
|
mapping, types = _column_profile(service, dataset_id, view_id, project_id)
|
|
1519
1555
|
data = _relabel_columns(service, dataset_id, view_id, project_id, data, mapping)
|
|
1520
|
-
data = _with_column_warnings(
|
|
1521
|
-
|
|
1556
|
+
data = _with_column_warnings(
|
|
1557
|
+
data, types, view_id, dataset_id, read_only=True, project_id=project_id
|
|
1558
|
+
)
|
|
1559
|
+
return _with_duplicates_fact(data, view_id, dataset_id, whole_view, project_id=project_id)
|
|
1522
1560
|
|
|
1523
1561
|
|
|
1524
|
-
def _with_duplicates_fact(
|
|
1562
|
+
def _with_duplicates_fact(
|
|
1563
|
+
data: Any,
|
|
1564
|
+
view_id: int,
|
|
1565
|
+
dataset_id: int | None,
|
|
1566
|
+
whole_view: bool,
|
|
1567
|
+
*,
|
|
1568
|
+
project_id: int | None = None,
|
|
1569
|
+
) -> Any:
|
|
1525
1570
|
"""Add ``duplicates``: the read's own statement about exact duplicate rows."""
|
|
1526
1571
|
if not isinstance(data, dict) or not isinstance(data.get(_ROWS_KEY), list):
|
|
1527
1572
|
return data
|
|
1528
|
-
fact = duplicate_rows_fact(
|
|
1573
|
+
fact = duplicate_rows_fact(
|
|
1574
|
+
data[_ROWS_KEY], view_id, dataset_id, whole_view=whole_view, project_id=project_id
|
|
1575
|
+
)
|
|
1529
1576
|
return {**data, "duplicates": fact} if fact is not None else data
|
|
1530
1577
|
|
|
1531
1578
|
|
|
@@ -1546,6 +1593,7 @@ def _with_column_warnings(
|
|
|
1546
1593
|
view_id: int,
|
|
1547
1594
|
dataset_id: int | None = None,
|
|
1548
1595
|
read_only: bool = False,
|
|
1596
|
+
project_id: int | None = None,
|
|
1549
1597
|
) -> Any:
|
|
1550
1598
|
"""Add ``column_checks`` (always) and ``column_warnings`` (when found).
|
|
1551
1599
|
|
|
@@ -1556,7 +1604,7 @@ def _with_column_warnings(
|
|
|
1556
1604
|
if not isinstance(data, dict) or not isinstance(data.get(_ROWS_KEY, []), list):
|
|
1557
1605
|
return data
|
|
1558
1606
|
checks, warnings = _check_columns(
|
|
1559
|
-
data.get(_ROWS_KEY) or [], types, view_id, dataset_id, read_only
|
|
1607
|
+
data.get(_ROWS_KEY) or [], types, view_id, dataset_id, read_only, project_id
|
|
1560
1608
|
)
|
|
1561
1609
|
out = {**data, "column_checks": checks}
|
|
1562
1610
|
return {**out, "column_warnings": warnings} if warnings else out
|
|
@@ -1568,6 +1616,7 @@ def _check_columns(
|
|
|
1568
1616
|
view_id: int,
|
|
1569
1617
|
dataset_id: int | None,
|
|
1570
1618
|
read_only: bool = False,
|
|
1619
|
+
project_id: int | None = None,
|
|
1571
1620
|
) -> tuple[dict[str, Any], list[dict[str, Any]]]:
|
|
1572
1621
|
"""Run ``column_warnings`` and describe what was checked (never raises)."""
|
|
1573
1622
|
checks: dict[str, Any] = {
|
|
@@ -1579,7 +1628,7 @@ def _check_columns(
|
|
|
1579
1628
|
warnings: list[dict[str, Any]] = []
|
|
1580
1629
|
if rows and types:
|
|
1581
1630
|
try:
|
|
1582
|
-
warnings = column_warnings(rows, types, view_id, dataset_id, read_only)
|
|
1631
|
+
warnings = column_warnings(rows, types, view_id, dataset_id, read_only, project_id)
|
|
1583
1632
|
except Exception as exc: # noqa: BLE001 -- a presentation aid must not fail the read
|
|
1584
1633
|
checks["checked"] = []
|
|
1585
1634
|
checks["error"] = f"{type(exc).__name__}: {exc}"
|
|
@@ -4755,7 +4804,7 @@ def upload_preview(
|
|
|
4755
4804
|
rows = [row for row in rows or [] if isinstance(row, dict)]
|
|
4756
4805
|
except Exception as exc: # noqa: BLE001 -- a preview must never fail the upload
|
|
4757
4806
|
return {"preview_error": f"{type(exc).__name__}: {exc}"}
|
|
4758
|
-
checks, warnings = _check_columns(rows, types, view_id, dataset_id)
|
|
4807
|
+
checks, warnings = _check_columns(rows, types, view_id, dataset_id, project_id=project_id)
|
|
4759
4808
|
preview: dict[str, Any] = {
|
|
4760
4809
|
"view_id": view_id,
|
|
4761
4810
|
"view_name": record.get("name"),
|
|
@@ -32,6 +32,7 @@ from mammoth_cli.commands.view import (
|
|
|
32
32
|
BRIEF_VIEW_FIELDS,
|
|
33
33
|
UNFINISHED_STATE,
|
|
34
34
|
_dataview_metadata,
|
|
35
|
+
_display_name_map,
|
|
35
36
|
_require_discovery_allowed,
|
|
36
37
|
apply_column_renames,
|
|
37
38
|
brief_view_record,
|
|
@@ -66,6 +67,15 @@ from mammoth_cli.services.command_contract import bind_command_inputs
|
|
|
66
67
|
from mammoth_cli.services.conditions import CONDITION_KWARG, compile_condition
|
|
67
68
|
from mammoth_cli.services.input_fields import TASK_COUNT_FIELD
|
|
68
69
|
from mammoth_cli.services.sql_check import check_sql_binds
|
|
70
|
+
from mammoth_cli.services.view_variants import (
|
|
71
|
+
VariantPlan,
|
|
72
|
+
created_entry,
|
|
73
|
+
name_template_of,
|
|
74
|
+
partial_failure,
|
|
75
|
+
plan_variants,
|
|
76
|
+
require_known_column,
|
|
77
|
+
variants_result,
|
|
78
|
+
)
|
|
69
79
|
from mammoth_cli.services.write_impact import (
|
|
70
80
|
ImpactRead,
|
|
71
81
|
Measure,
|
|
@@ -772,6 +782,65 @@ def _require_clone_from_same_dataset(service: Any, clone_from: int, dataset_id:
|
|
|
772
782
|
)
|
|
773
783
|
|
|
774
784
|
|
|
785
|
+
_VIEW_CREATE_SYMBOL = "mammoth.client.ViewsResource.create"
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
def view_variants_create(invocation: Invocation) -> HandlerResult:
|
|
789
|
+
"""Create one view per value of a column: each a clone of ``from_view`` filtered to it.
|
|
790
|
+
|
|
791
|
+
Composes ``view create`` (``clone_from``) and ``view transform filter``. All
|
|
792
|
+
checks that need no write run first; the first failing write stops the run
|
|
793
|
+
and the error names every view already created.
|
|
794
|
+
"""
|
|
795
|
+
dataset_id = _require_int_positional(invocation, "dataset id")
|
|
796
|
+
raw = invocation.load_input()
|
|
797
|
+
for field in ("from_view", "column", "values"):
|
|
798
|
+
_require_field(raw, field)
|
|
799
|
+
document = bind_command_inputs(invocation.command_id, raw)
|
|
800
|
+
from_view = int(document["from_view"])
|
|
801
|
+
column = str(document["column"])
|
|
802
|
+
with open_service(invocation) as (service, auth):
|
|
803
|
+
_require_clone_from_same_dataset(service, from_view, dataset_id)
|
|
804
|
+
source = service.call(_DATAVIEW_GET_SYMBOL, dataset_id=dataset_id, dataview_id=from_view)
|
|
805
|
+
names = set(_display_name_map(service, dataset_id, from_view, None).values())
|
|
806
|
+
require_known_column(from_view, column, names)
|
|
807
|
+
plans = plan_variants(
|
|
808
|
+
str(source.get("name", "")) if isinstance(source, dict) else "",
|
|
809
|
+
column,
|
|
810
|
+
document["values"],
|
|
811
|
+
name_template_of(document),
|
|
812
|
+
)
|
|
813
|
+
created = _create_variants(service, dataset_id, from_view, plans)
|
|
814
|
+
result = variants_result(dataset_id, from_view, column, created)
|
|
815
|
+
return result, _meta(invocation, auth.workspace_id)
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
def _create_variants(
|
|
819
|
+
service: Any, dataset_id: int, from_view: int, plans: list[VariantPlan]
|
|
820
|
+
) -> list[dict[str, Any]]:
|
|
821
|
+
"""Create and filter each variant in order; the first failure stops with a full report."""
|
|
822
|
+
created: list[dict[str, Any]] = []
|
|
823
|
+
for position, plan in enumerate(plans):
|
|
824
|
+
new_id: int | None = None
|
|
825
|
+
try:
|
|
826
|
+
view = _view_payload(
|
|
827
|
+
service.call(
|
|
828
|
+
_VIEW_CREATE_SYMBOL, dataset_id=dataset_id, name=plan.name, clone_from=from_view
|
|
829
|
+
)
|
|
830
|
+
)
|
|
831
|
+
new_id = int(view["id"])
|
|
832
|
+
data = service.call_view(
|
|
833
|
+
new_id, "filter_rows", dataset_id=dataset_id, condition=plan.condition
|
|
834
|
+
)
|
|
835
|
+
reject_pipeline_reference_errors(service, new_id, dataset_id, data)
|
|
836
|
+
except CliError as exc:
|
|
837
|
+
raise partial_failure(
|
|
838
|
+
plan, exc, created, plans[position + 1 :], new_id, dataset_id
|
|
839
|
+
) from exc
|
|
840
|
+
created.append(created_entry(plan, view))
|
|
841
|
+
return created
|
|
842
|
+
|
|
843
|
+
|
|
775
844
|
_DASHBOARDS_LIST_SYMBOL = "mammoth.api.dashboards.DashboardsAPI.list"
|
|
776
845
|
|
|
777
846
|
|
|
@@ -153,6 +153,7 @@ ERROR_SUMMARIES: dict[str, str] = {
|
|
|
153
153
|
"missing_field": _S_MISSING_INFO,
|
|
154
154
|
"network_error": "Mammoth couldn't be reached over the network.",
|
|
155
155
|
"no_op": "There is nothing to change, so this step isn't needed.",
|
|
156
|
+
"variants_partial_failure": "Some of the variant views were created and one failed.",
|
|
156
157
|
"no_output": "This step didn't return anything.",
|
|
157
158
|
"nonfinite_input_number": _S_BAD_INPUT,
|
|
158
159
|
"not_authenticated": _S_SIGN_IN,
|
|
@@ -350,6 +350,15 @@ _VIEW_DATA_PROFILE_FIELDS = (
|
|
|
350
350
|
FieldSpec("limit", required=False, annotation=int, default=50),
|
|
351
351
|
)
|
|
352
352
|
|
|
353
|
+
# view.variants.create is a CLI composite over view create (clone_from) and
|
|
354
|
+
# view transform filter; its document fields are authored here.
|
|
355
|
+
_VIEW_VARIANTS_CREATE_FIELDS = (
|
|
356
|
+
FieldSpec("from_view", required=True, annotation=int),
|
|
357
|
+
FieldSpec("column", required=True, annotation=str),
|
|
358
|
+
FieldSpec("values", required=True, annotation=list[str | int | float]),
|
|
359
|
+
FieldSpec("name_template", required=False, annotation=str | None, default=None),
|
|
360
|
+
)
|
|
361
|
+
|
|
353
362
|
# view.conditional-format.create: ``rule`` (raw body) stays accepted; the typed fields build one
|
|
354
363
|
# rule per column (per-cell threshold) or one row rule (see
|
|
355
364
|
# mammoth_cli.services.conditional_format). ``rule`` is therefore optional here -- the handler
|
|
@@ -723,6 +732,14 @@ _S7_ADDITIONAL_INPUT_FIELDS: dict[str, tuple[FieldSpec, ...]] = {
|
|
|
723
732
|
# The typed rename: the handler builds the one ``replace`` on ``name``; the
|
|
724
733
|
# SDK's free-form ``patch_data`` is handler-owned and never offered.
|
|
725
734
|
"view.update": (FieldSpec("name", required=True, annotation=str),),
|
|
735
|
+
# The endpoint's own params: ``page`` is {"id"} or {"new_title"}; the handler maps
|
|
736
|
+
# it onto the SDK's page_id / page_new_title.
|
|
737
|
+
"dashboard.figure.add": (
|
|
738
|
+
FieldSpec("dataview_id", required=True, annotation=int),
|
|
739
|
+
FieldSpec("figure", required=True, annotation=dict[str, Any]),
|
|
740
|
+
FieldSpec("banded", required=False, annotation=dict[str, Any] | None, default=None),
|
|
741
|
+
FieldSpec("page", required=False, annotation=dict[str, Any] | None, default=None),
|
|
742
|
+
),
|
|
726
743
|
"user.preference.update": (
|
|
727
744
|
# PreferencesPatchRequest: replace ops on dotted paths rooted at
|
|
728
745
|
# GLOBAL or WORKSPACE_PREFERENCES.
|
|
@@ -795,6 +812,8 @@ def resolve_command_contract(command_id: str) -> ResolvedCommandContract | None:
|
|
|
795
812
|
special_fields = _VIEW_DATA_COMPARE_FIELDS
|
|
796
813
|
elif command_id == "view.data.profile":
|
|
797
814
|
special_fields = _VIEW_DATA_PROFILE_FIELDS
|
|
815
|
+
elif command_id == "view.variants.create":
|
|
816
|
+
special_fields = _VIEW_VARIANTS_CREATE_FIELDS
|
|
798
817
|
elif command_id == "dashboard.filter.add":
|
|
799
818
|
special_fields = _DASHBOARD_FILTER_ADD_FIELDS
|
|
800
819
|
elif command_id == "dashboard.filter.remove":
|
|
@@ -65,18 +65,31 @@ def _is_date(text: str) -> bool:
|
|
|
65
65
|
return False
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
def
|
|
68
|
+
def _project_flag(project_id: int | None) -> str:
|
|
69
|
+
"""`` --project N`` for a fix command, or nothing when the project is not known."""
|
|
70
|
+
return f" --project {project_id}" if project_id is not None else ""
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def _convert_hint(view_id: int | None, column: str, to: str, project_id: int | None) -> str:
|
|
69
74
|
target = str(view_id) if view_id is not None else "VIEW_ID"
|
|
70
75
|
spec = json.dumps({"conversions": [{"column": column, "to": to}]})
|
|
71
|
-
return
|
|
76
|
+
return (
|
|
77
|
+
f"mammoth view transform convert-type {target} --input {shlex.quote(spec)}"
|
|
78
|
+
f"{_project_flag(project_id)}"
|
|
79
|
+
)
|
|
72
80
|
|
|
73
81
|
|
|
74
|
-
def _bulk_replace_hint(
|
|
82
|
+
def _bulk_replace_hint(
|
|
83
|
+
view_id: int | None, column: str, mapping: list[dict[str, Any]], project_id: int | None
|
|
84
|
+
) -> str:
|
|
75
85
|
target = str(view_id) if view_id is not None else "VIEW_ID"
|
|
76
86
|
spec = json.dumps(
|
|
77
87
|
{"columns": [column], "mapping": mapping, "match_case": True, "match_words": True}
|
|
78
88
|
)
|
|
79
|
-
return
|
|
89
|
+
return (
|
|
90
|
+
f"mammoth view transform bulk-replace {target} --input {shlex.quote(spec)}"
|
|
91
|
+
f"{_project_flag(project_id)}"
|
|
92
|
+
)
|
|
80
93
|
|
|
81
94
|
|
|
82
95
|
def _spelling_key(text: str) -> str:
|
|
@@ -149,6 +162,7 @@ def _variant_spellings_warning(
|
|
|
149
162
|
texts: list[str],
|
|
150
163
|
view_id: int | None,
|
|
151
164
|
checked: int,
|
|
165
|
+
project_id: int | None,
|
|
152
166
|
) -> dict[str, Any] | None:
|
|
153
167
|
groups = _variant_spelling_groups(texts)
|
|
154
168
|
if not groups:
|
|
@@ -172,7 +186,7 @@ def _variant_spellings_warning(
|
|
|
172
186
|
"column": column,
|
|
173
187
|
"issue": "variant_spellings",
|
|
174
188
|
"detail": detail,
|
|
175
|
-
"fix": _bulk_replace_hint(view_id, column, mapping),
|
|
189
|
+
"fix": _bulk_replace_hint(view_id, column, mapping, project_id),
|
|
176
190
|
"rows_checked": checked,
|
|
177
191
|
}
|
|
178
192
|
|
|
@@ -206,6 +220,7 @@ def _renamed_label_warning(
|
|
|
206
220
|
column: str,
|
|
207
221
|
date_column: str,
|
|
208
222
|
view_id: int | None,
|
|
223
|
+
project_id: int | None,
|
|
209
224
|
) -> dict[str, Any] | None:
|
|
210
225
|
"""A label that stops before a longer label starting with its words begins
|
|
211
226
|
reads as one thing renamed ("Riverside" -> "Riverside Mall"): left apart, its
|
|
@@ -240,7 +255,7 @@ def _renamed_label_warning(
|
|
|
240
255
|
"its figures split across two names and a period comparison shows a drop "
|
|
241
256
|
"and a new entry that are the same thing; confirm, then unify them."
|
|
242
257
|
),
|
|
243
|
-
"fix": _bulk_replace_hint(view_id, column, mapping),
|
|
258
|
+
"fix": _bulk_replace_hint(view_id, column, mapping, project_id),
|
|
244
259
|
"rows_checked": len(rows),
|
|
245
260
|
}
|
|
246
261
|
|
|
@@ -273,6 +288,7 @@ def duplicate_rows_fact(
|
|
|
273
288
|
dataset_id: int | None,
|
|
274
289
|
*,
|
|
275
290
|
whole_view: bool,
|
|
291
|
+
project_id: int | None = None,
|
|
276
292
|
) -> dict[str, Any] | None:
|
|
277
293
|
"""The read's positive statement about exact duplicate rows (zero included).
|
|
278
294
|
|
|
@@ -308,7 +324,7 @@ def duplicate_rows_fact(
|
|
|
308
324
|
spec = json.dumps({"dataset_id": dataset_id})
|
|
309
325
|
fact["table_wide_check"] = (
|
|
310
326
|
f"mammoth view transform discard-duplicates {view_id} "
|
|
311
|
-
f"--input {shlex.quote(spec)} --dry-run"
|
|
327
|
+
f"--input {shlex.quote(spec)} --dry-run{_project_flag(project_id)}"
|
|
312
328
|
)
|
|
313
329
|
return fact
|
|
314
330
|
|
|
@@ -317,6 +333,7 @@ def _duplicate_rows_warning(
|
|
|
317
333
|
rows: list[Mapping[str, Any]],
|
|
318
334
|
view_id: int | None,
|
|
319
335
|
dataset_id: int | None,
|
|
336
|
+
project_id: int | None,
|
|
320
337
|
) -> dict[str, Any] | None:
|
|
321
338
|
"""Return a table-level warning when the page itself holds exact duplicates.
|
|
322
339
|
|
|
@@ -340,6 +357,7 @@ def _duplicate_rows_warning(
|
|
|
340
357
|
spec = json.dumps({"dataset_id": dataset_id})
|
|
341
358
|
warning["fix"] = (
|
|
342
359
|
f"mammoth view transform discard-duplicates {view_id} --input {shlex.quote(spec)}"
|
|
360
|
+
f"{_project_flag(project_id)}"
|
|
343
361
|
)
|
|
344
362
|
return warning
|
|
345
363
|
|
|
@@ -389,11 +407,16 @@ def _blank_values_warning(
|
|
|
389
407
|
}
|
|
390
408
|
|
|
391
409
|
|
|
392
|
-
def _remove_blank_rows_hint(
|
|
410
|
+
def _remove_blank_rows_hint(
|
|
411
|
+
view_id: int, dataset_id: int, column: str, project_id: int | None
|
|
412
|
+
) -> str:
|
|
393
413
|
spec = json.dumps(
|
|
394
414
|
{"condition": {"column": column, "operator": "IS_NOT_EMPTY"}, "dataset_id": dataset_id}
|
|
395
415
|
)
|
|
396
|
-
return
|
|
416
|
+
return (
|
|
417
|
+
f"mammoth view transform filter {view_id} --input {shlex.quote(spec)}"
|
|
418
|
+
f"{_project_flag(project_id)}"
|
|
419
|
+
)
|
|
397
420
|
|
|
398
421
|
|
|
399
422
|
def column_warnings(
|
|
@@ -402,6 +425,7 @@ def column_warnings(
|
|
|
402
425
|
view_id: int | None = None,
|
|
403
426
|
dataset_id: int | None = None,
|
|
404
427
|
read_only: bool = False,
|
|
428
|
+
project_id: int | None = None,
|
|
405
429
|
) -> list[dict[str, Any]]:
|
|
406
430
|
"""Return warnings for text columns that hold numbers or dates, and for blanks.
|
|
407
431
|
|
|
@@ -413,6 +437,8 @@ def column_warnings(
|
|
|
413
437
|
command (a mutation, so it needs the exact parent, not discovery).
|
|
414
438
|
read_only: The rows came from a read-only data read; a ``dates_stored_as_text``
|
|
415
439
|
finding then carries no ``fix``, since a read answers from the text as it is.
|
|
440
|
+
project_id: The project the rows were read from; each fix command names it
|
|
441
|
+
with ``--project`` (the saved profile project may differ, or be absent).
|
|
416
442
|
|
|
417
443
|
Returns:
|
|
418
444
|
One record per finding: ``column``, ``issue``
|
|
@@ -428,7 +454,7 @@ def column_warnings(
|
|
|
428
454
|
checked = len(materialised)
|
|
429
455
|
warnings: list[dict[str, Any]] = []
|
|
430
456
|
figures = _varying_numbers(materialised, column_types)
|
|
431
|
-
duplicate_warning = _duplicate_rows_warning(materialised, view_id, dataset_id)
|
|
457
|
+
duplicate_warning = _duplicate_rows_warning(materialised, view_id, dataset_id, project_id)
|
|
432
458
|
if duplicate_warning is not None:
|
|
433
459
|
warnings.append(duplicate_warning)
|
|
434
460
|
for column, col_type in column_types.items():
|
|
@@ -466,10 +492,12 @@ def column_warnings(
|
|
|
466
492
|
detail += "."
|
|
467
493
|
finding: dict[str, Any] = {"column": column, "issue": issue, "detail": detail}
|
|
468
494
|
if not (read_only and kind == "dates"):
|
|
469
|
-
finding["fix"] = _convert_hint(view_id, column, to)
|
|
495
|
+
finding["fix"] = _convert_hint(view_id, column, to, project_id)
|
|
470
496
|
warnings.append({**finding, "rows_checked": checked})
|
|
471
497
|
break
|
|
472
|
-
variant_warning = _variant_spellings_warning(
|
|
498
|
+
variant_warning = _variant_spellings_warning(
|
|
499
|
+
column, texts, view_id, checked, project_id
|
|
500
|
+
)
|
|
473
501
|
if variant_warning is not None:
|
|
474
502
|
warnings.append(variant_warning)
|
|
475
503
|
date_column = next(
|
|
@@ -477,7 +505,7 @@ def column_warnings(
|
|
|
477
505
|
None,
|
|
478
506
|
)
|
|
479
507
|
renamed = (
|
|
480
|
-
_renamed_label_warning(materialised, column, date_column, view_id)
|
|
508
|
+
_renamed_label_warning(materialised, column, date_column, view_id, project_id)
|
|
481
509
|
if date_column is not None
|
|
482
510
|
else None
|
|
483
511
|
)
|
|
@@ -486,6 +514,6 @@ def column_warnings(
|
|
|
486
514
|
if blanks:
|
|
487
515
|
remove_fix = None
|
|
488
516
|
if figures == [column] and view_id is not None and dataset_id is not None:
|
|
489
|
-
remove_fix = _remove_blank_rows_hint(view_id, dataset_id, column)
|
|
517
|
+
remove_fix = _remove_blank_rows_hint(view_id, dataset_id, column, project_id)
|
|
490
518
|
warnings.append(_blank_values_warning(column, blanks, len(values), checked, remove_fix))
|
|
491
519
|
return warnings
|