databay-cli 0.1.0__py3-none-any.whl
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.
- databay/__init__.py +5 -0
- databay/__main__.py +7 -0
- databay/agent_skill.py +184 -0
- databay/api.py +626 -0
- databay/cli/__init__.py +0 -0
- databay/cli/auth.py +377 -0
- databay/cli/build.py +89 -0
- databay/cli/commands/__init__.py +0 -0
- databay/cli/commands/alerting_webhook.py +19 -0
- databay/cli/commands/alerting_webhook_tag.py +14 -0
- databay/cli/commands/alerting_webhook_type.py +14 -0
- databay/cli/commands/alerting_webhook_undelivered.py +15 -0
- databay/cli/commands/announcement.py +17 -0
- databay/cli/commands/api_key.py +18 -0
- databay/cli/commands/api_key_project.py +16 -0
- databay/cli/commands/backfill_reason_code.py +14 -0
- databay/cli/commands/backfill_run.py +17 -0
- databay/cli/commands/canvas.py +16 -0
- databay/cli/commands/canvas_graph.py +15 -0
- databay/cli/commands/canvas_table_check.py +15 -0
- databay/cli/commands/dashboards.py +21 -0
- databay/cli/commands/dashboards_card.py +20 -0
- databay/cli/commands/dashboards_dataset.py +14 -0
- databay/cli/commands/dashboards_folder.py +16 -0
- databay/cli/commands/dashboards_home.py +17 -0
- databay/cli/commands/dashboards_placement.py +16 -0
- databay/cli/commands/db.py +19 -0
- databay/cli/commands/db_column.py +14 -0
- databay/cli/commands/docs_article.py +16 -0
- databay/cli/commands/dq_result.py +14 -0
- databay/cli/commands/dq_rule.py +16 -0
- databay/cli/commands/feature.py +14 -0
- databay/cli/commands/google_ads_source.py +14 -0
- databay/cli/commands/google_analytics_source.py +14 -0
- databay/cli/commands/instagram_account.py +14 -0
- databay/cli/commands/instagram_source.py +14 -0
- databay/cli/commands/linkedin_account.py +14 -0
- databay/cli/commands/linkedin_source.py +14 -0
- databay/cli/commands/me.py +14 -0
- databay/cli/commands/meta_ads_source.py +14 -0
- databay/cli/commands/metric_models.py +26 -0
- databay/cli/commands/metrics.py +14 -0
- databay/cli/commands/models.py +16 -0
- databay/cli/commands/nlq.py +15 -0
- databay/cli/commands/notebook_credential.py +16 -0
- databay/cli/commands/org.py +14 -0
- databay/cli/commands/org_member.py +17 -0
- databay/cli/commands/org_offboarding.py +14 -0
- databay/cli/commands/pipe.py +26 -0
- databay/cli/commands/pipe_backfill_run.py +14 -0
- databay/cli/commands/pipe_config_option.py +14 -0
- databay/cli/commands/pipe_destination.py +16 -0
- databay/cli/commands/pipe_leftover.py +16 -0
- databay/cli/commands/pipe_sink_type.py +14 -0
- databay/cli/commands/pipe_source_type.py +14 -0
- databay/cli/commands/pipe_status_bucket.py +14 -0
- databay/cli/commands/pipe_stuck_delete.py +14 -0
- databay/cli/commands/plan.py +14 -0
- databay/cli/commands/project.py +21 -0
- databay/cli/commands/project_budget.py +15 -0
- databay/cli/commands/project_member.py +18 -0
- databay/cli/commands/project_privilege.py +16 -0
- databay/cli/commands/project_share.py +16 -0
- databay/cli/commands/provision.py +14 -0
- databay/cli/commands/provisioning.py +14 -0
- databay/cli/commands/registry.py +14 -0
- databay/cli/commands/resource_home.py +14 -0
- databay/cli/commands/schema_change.py +18 -0
- databay/cli/commands/schema_history.py +17 -0
- databay/cli/commands/schema_version.py +16 -0
- databay/cli/commands/shopify_store.py +14 -0
- databay/cli/commands/sink_data_type.py +14 -0
- databay/cli/commands/source.py +24 -0
- databay/cli/commands/source_catalog.py +15 -0
- databay/cli/commands/source_check_run.py +17 -0
- databay/cli/commands/source_hidden_type.py +14 -0
- databay/cli/commands/source_name.py +14 -0
- databay/cli/commands/source_pipe.py +14 -0
- databay/cli/commands/source_publication.py +16 -0
- databay/cli/commands/source_readiness_override.py +15 -0
- databay/cli/commands/source_setup_choice.py +16 -0
- databay/cli/commands/source_stream.py +15 -0
- databay/cli/commands/source_table.py +14 -0
- databay/cli/commands/ssbi_job.py +18 -0
- databay/cli/commands/transform_type.py +14 -0
- databay/cli/commands/usage.py +14 -0
- databay/cli/commands/warehouse.py +21 -0
- databay/cli/commands/warehouse_access_assignment.py +16 -0
- databay/cli/commands/warehouse_access_role.py +22 -0
- databay/cli/commands/warehouse_access_settings.py +17 -0
- databay/cli/commands/warehouse_login.py +20 -0
- databay/cli/commands/warehouse_principal.py +17 -0
- databay/cli/commands/warehouse_service_account.py +17 -0
- databay/cli/commands/warehouse_service_account_credential.py +18 -0
- databay/cli/common.py +93 -0
- databay/cli/console.py +121 -0
- databay/cli/flags.py +183 -0
- databay/cli/handwritten.py +22 -0
- databay/cli/main.py +198 -0
- databay/cli/metrics.py +171 -0
- databay/cli/org.py +193 -0
- databay/cli/output.py +134 -0
- databay/cli/pipe_wait.py +357 -0
- databay/cli/profile.py +230 -0
- databay/cli/runner.py +432 -0
- databay/cli/skill.py +64 -0
- databay/cli/sql.py +84 -0
- databay/compat.py +161 -0
- databay/credentials.py +217 -0
- databay/error_catalog.py +226 -0
- databay/error_codes.py +3265 -0
- databay/errors.py +222 -0
- databay/feature_header.py +40 -0
- databay/invoke.py +225 -0
- databay/locks.py +41 -0
- databay/login_flow.py +245 -0
- databay/model_base.py +40 -0
- databay/models/__init__.py +0 -0
- databay/models/alerting_webhook.py +46 -0
- databay/models/alerting_webhook_tag.py +11 -0
- databay/models/alerting_webhook_type.py +11 -0
- databay/models/alerting_webhook_undelivered.py +23 -0
- databay/models/announcement.py +37 -0
- databay/models/api_key.py +81 -0
- databay/models/api_key_project.py +29 -0
- databay/models/backfill_reason_code.py +11 -0
- databay/models/backfill_run.py +41 -0
- databay/models/canvas.py +68 -0
- databay/models/canvas_graph.py +86 -0
- databay/models/canvas_table_check.py +181 -0
- databay/models/dashboards.py +79 -0
- databay/models/dashboards_card.py +37 -0
- databay/models/dashboards_dataset.py +27 -0
- databay/models/dashboards_folder.py +18 -0
- databay/models/dashboards_home.py +28 -0
- databay/models/db.py +34 -0
- databay/models/db_column.py +11 -0
- databay/models/docs_article.py +59 -0
- databay/models/dq_result.py +27 -0
- databay/models/dq_rule.py +43 -0
- databay/models/feature.py +15 -0
- databay/models/google_ads_source.py +11 -0
- databay/models/google_analytics_source.py +11 -0
- databay/models/instagram_source.py +11 -0
- databay/models/linkedin_source.py +11 -0
- databay/models/me.py +71 -0
- databay/models/meta_ads_source.py +11 -0
- databay/models/metric_models.py +274 -0
- databay/models/metrics.py +158 -0
- databay/models/models.py +73 -0
- databay/models/nlq.py +92 -0
- databay/models/notebook_credential.py +51 -0
- databay/models/org.py +44 -0
- databay/models/org_member.py +123 -0
- databay/models/org_offboarding.py +36 -0
- databay/models/pipe.py +340 -0
- databay/models/pipe_config_option.py +25 -0
- databay/models/pipe_destination.py +128 -0
- databay/models/pipe_leftover.py +51 -0
- databay/models/pipe_sink_type.py +11 -0
- databay/models/pipe_source_type.py +11 -0
- databay/models/pipe_status_bucket.py +13 -0
- databay/models/pipe_stuck_delete.py +25 -0
- databay/models/plan.py +37 -0
- databay/models/project.py +154 -0
- databay/models/project_budget.py +22 -0
- databay/models/project_member.py +67 -0
- databay/models/project_privilege.py +21 -0
- databay/models/project_share.py +76 -0
- databay/models/provision.py +12 -0
- databay/models/provisioning.py +20 -0
- databay/models/registry.py +18 -0
- databay/models/resource_home.py +35 -0
- databay/models/schema_change.py +96 -0
- databay/models/schema_history.py +32 -0
- databay/models/schema_version.py +23 -0
- databay/models/shared.py +875 -0
- databay/models/shopify_store.py +19 -0
- databay/models/sink_data_type.py +11 -0
- databay/models/source.py +263 -0
- databay/models/source_catalog.py +82 -0
- databay/models/source_check_run.py +63 -0
- databay/models/source_hidden_type.py +13 -0
- databay/models/source_name.py +18 -0
- databay/models/source_pipe.py +16 -0
- databay/models/source_publication.py +30 -0
- databay/models/source_readiness_override.py +13 -0
- databay/models/source_setup_choice.py +33 -0
- databay/models/source_stream.py +65 -0
- databay/models/source_table.py +27 -0
- databay/models/sql.py +31 -0
- databay/models/ssbi_job.py +97 -0
- databay/models/transform_type.py +40 -0
- databay/models/usage.py +112 -0
- databay/models/warehouse.py +38 -0
- databay/models/warehouse_access_assignment.py +70 -0
- databay/models/warehouse_access_role.py +148 -0
- databay/models/warehouse_access_settings.py +35 -0
- databay/models/warehouse_login.py +20 -0
- databay/models/warehouse_principal.py +49 -0
- databay/models/warehouse_service_account.py +35 -0
- databay/models/warehouse_service_account_credential.py +11 -0
- databay/oidc.py +205 -0
- databay/operation.py +191 -0
- databay/operations/__init__.py +0 -0
- databay/operations/alerting_webhook.py +317 -0
- databay/operations/alerting_webhook_tag.py +35 -0
- databay/operations/alerting_webhook_type.py +35 -0
- databay/operations/alerting_webhook_undelivered.py +74 -0
- databay/operations/announcement.py +135 -0
- databay/operations/api_key.py +198 -0
- databay/operations/api_key_project.py +130 -0
- databay/operations/backfill_reason_code.py +35 -0
- databay/operations/backfill_run.py +245 -0
- databay/operations/canvas.py +136 -0
- databay/operations/canvas_graph.py +102 -0
- databay/operations/canvas_table_check.py +101 -0
- databay/operations/dashboards.py +441 -0
- databay/operations/dashboards_card.py +406 -0
- databay/operations/dashboards_dataset.py +50 -0
- databay/operations/dashboards_folder.py +146 -0
- databay/operations/dashboards_home.py +176 -0
- databay/operations/dashboards_placement.py +152 -0
- databay/operations/db.py +337 -0
- databay/operations/db_column.py +57 -0
- databay/operations/docs_article.py +101 -0
- databay/operations/dq_result.py +43 -0
- databay/operations/dq_rule.py +155 -0
- databay/operations/feature.py +35 -0
- databay/operations/google_ads_source.py +40 -0
- databay/operations/google_analytics_source.py +40 -0
- databay/operations/instagram_account.py +47 -0
- databay/operations/instagram_source.py +40 -0
- databay/operations/linkedin_account.py +47 -0
- databay/operations/linkedin_source.py +40 -0
- databay/operations/me.py +57 -0
- databay/operations/meta_ads_source.py +40 -0
- databay/operations/metric_models.py +612 -0
- databay/operations/metrics.py +218 -0
- databay/operations/models.py +123 -0
- databay/operations/nlq.py +100 -0
- databay/operations/notebook_credential.py +95 -0
- databay/operations/org.py +79 -0
- databay/operations/org_member.py +192 -0
- databay/operations/org_offboarding.py +43 -0
- databay/operations/pipe.py +882 -0
- databay/operations/pipe_backfill_run.py +72 -0
- databay/operations/pipe_config_option.py +50 -0
- databay/operations/pipe_destination.py +178 -0
- databay/operations/pipe_leftover.py +110 -0
- databay/operations/pipe_sink_type.py +35 -0
- databay/operations/pipe_source_type.py +35 -0
- databay/operations/pipe_status_bucket.py +35 -0
- databay/operations/pipe_stuck_delete.py +52 -0
- databay/operations/plan.py +35 -0
- databay/operations/project.py +346 -0
- databay/operations/project_budget.py +135 -0
- databay/operations/project_member.py +226 -0
- databay/operations/project_privilege.py +143 -0
- databay/operations/project_share.py +160 -0
- databay/operations/provision.py +35 -0
- databay/operations/provisioning.py +35 -0
- databay/operations/registry.py +35 -0
- databay/operations/resource_home.py +80 -0
- databay/operations/schema_change.py +222 -0
- databay/operations/schema_history.py +136 -0
- databay/operations/schema_version.py +115 -0
- databay/operations/shopify_store.py +40 -0
- databay/operations/sink_data_type.py +43 -0
- databay/operations/source.py +1207 -0
- databay/operations/source_catalog.py +135 -0
- databay/operations/source_check_run.py +242 -0
- databay/operations/source_hidden_type.py +59 -0
- databay/operations/source_name.py +69 -0
- databay/operations/source_pipe.py +57 -0
- databay/operations/source_publication.py +139 -0
- databay/operations/source_readiness_override.py +96 -0
- databay/operations/source_setup_choice.py +161 -0
- databay/operations/source_stream.py +99 -0
- databay/operations/source_table.py +59 -0
- databay/operations/sql.py +54 -0
- databay/operations/ssbi_job.py +242 -0
- databay/operations/transform_type.py +35 -0
- databay/operations/usage.py +35 -0
- databay/operations/warehouse.py +343 -0
- databay/operations/warehouse_access_assignment.py +179 -0
- databay/operations/warehouse_access_role.py +473 -0
- databay/operations/warehouse_access_settings.py +172 -0
- databay/operations/warehouse_login.py +308 -0
- databay/operations/warehouse_principal.py +174 -0
- databay/operations/warehouse_service_account.py +206 -0
- databay/operations/warehouse_service_account_credential.py +285 -0
- databay/paths.py +32 -0
- databay/platform_check.py +20 -0
- databay/profiles.py +181 -0
- databay/redact.py +22 -0
- databay/reference.py +218 -0
- databay/resource.py +167 -0
- databay/resources/__init__.py +0 -0
- databay/resources/alerting_webhook.py +84 -0
- databay/resources/alerting_webhook_tag.py +21 -0
- databay/resources/alerting_webhook_type.py +21 -0
- databay/resources/alerting_webhook_undelivered.py +35 -0
- databay/resources/announcement.py +45 -0
- databay/resources/api_key.py +56 -0
- databay/resources/api_key_project.py +47 -0
- databay/resources/backfill_reason_code.py +21 -0
- databay/resources/backfill_run.py +78 -0
- databay/resources/canvas.py +43 -0
- databay/resources/canvas_graph.py +38 -0
- databay/resources/canvas_table_check.py +38 -0
- databay/resources/dashboards.py +105 -0
- databay/resources/dashboards_card.py +97 -0
- databay/resources/dashboards_dataset.py +27 -0
- databay/resources/dashboards_folder.py +47 -0
- databay/resources/dashboards_home.py +59 -0
- databay/resources/dashboards_placement.py +47 -0
- databay/resources/db.py +87 -0
- databay/resources/db_column.py +28 -0
- databay/resources/docs_article.py +37 -0
- databay/resources/dq_result.py +25 -0
- databay/resources/dq_rule.py +48 -0
- databay/resources/feature.py +21 -0
- databay/resources/google_ads_source.py +25 -0
- databay/resources/google_analytics_source.py +25 -0
- databay/resources/instagram_account.py +27 -0
- databay/resources/instagram_source.py +25 -0
- databay/resources/linkedin_account.py +27 -0
- databay/resources/linkedin_source.py +25 -0
- databay/resources/me.py +27 -0
- databay/resources/meta_ads_source.py +25 -0
- databay/resources/metric_models.py +154 -0
- databay/resources/metrics.py +57 -0
- databay/resources/models.py +42 -0
- databay/resources/nlq.py +34 -0
- databay/resources/notebook_credential.py +41 -0
- databay/resources/org.py +29 -0
- databay/resources/org_member.py +53 -0
- databay/resources/org_offboarding.py +25 -0
- databay/resources/pipe.py +208 -0
- databay/resources/pipe_backfill_run.py +28 -0
- databay/resources/pipe_config_option.py +26 -0
- databay/resources/pipe_destination.py +49 -0
- databay/resources/pipe_leftover.py +42 -0
- databay/resources/pipe_sink_type.py +21 -0
- databay/resources/pipe_source_type.py +21 -0
- databay/resources/pipe_status_bucket.py +21 -0
- databay/resources/pipe_stuck_delete.py +27 -0
- databay/resources/plan.py +21 -0
- databay/resources/project.py +92 -0
- databay/resources/project_budget.py +38 -0
- databay/resources/project_member.py +68 -0
- databay/resources/project_privilege.py +48 -0
- databay/resources/project_share.py +47 -0
- databay/resources/provision.py +21 -0
- databay/resources/provisioning.py +21 -0
- databay/resources/registry.py +21 -0
- databay/resources/resource_home.py +29 -0
- databay/resources/schema_change.py +62 -0
- databay/resources/schema_history.py +52 -0
- databay/resources/schema_version.py +43 -0
- databay/resources/shopify_store.py +25 -0
- databay/resources/sink_data_type.py +25 -0
- databay/resources/source.py +132 -0
- databay/resources/source_catalog.py +34 -0
- databay/resources/source_check_run.py +67 -0
- databay/resources/source_hidden_type.py +25 -0
- databay/resources/source_name.py +27 -0
- databay/resources/source_pipe.py +28 -0
- databay/resources/source_publication.py +47 -0
- databay/resources/source_readiness_override.py +37 -0
- databay/resources/source_setup_choice.py +50 -0
- databay/resources/source_stream.py +38 -0
- databay/resources/source_table.py +27 -0
- databay/resources/sql.py +27 -0
- databay/resources/ssbi_job.py +69 -0
- databay/resources/transform_type.py +21 -0
- databay/resources/usage.py +21 -0
- databay/resources/warehouse.py +136 -0
- databay/resources/warehouse_access_assignment.py +51 -0
- databay/resources/warehouse_access_role.py +118 -0
- databay/resources/warehouse_access_settings.py +56 -0
- databay/resources/warehouse_login.py +81 -0
- databay/resources/warehouse_principal.py +51 -0
- databay/resources/warehouse_service_account.py +61 -0
- databay/resources/warehouse_service_account_credential.py +78 -0
- databay/sdk.py +77 -0
- databay/settings.py +90 -0
- databay/skill/SKILL.md +357 -0
- databay/skill/references/commands.md +7025 -0
- databay/skill/references/errors.md +727 -0
- databay/spec.py +362 -0
- databay/stored_token.py +134 -0
- databay/tokens.py +108 -0
- databay/transport.py +357 -0
- databay/update_check.py +151 -0
- databay/version.py +6 -0
- databay/waits.py +330 -0
- databay_cli-0.1.0.dist-info/METADATA +42 -0
- databay_cli-0.1.0.dist-info/RECORD +403 -0
- databay_cli-0.1.0.dist-info/WHEEL +4 -0
- databay_cli-0.1.0.dist-info/entry_points.txt +2 -0
- databay_cli-0.1.0.dist-info/licenses/LICENSE +202 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"""The ``metrics`` operations.
|
|
2
|
+
|
|
3
|
+
Generated by python/tools/gen_client.py from contract/core.json; do not edit.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from databay.operation import Body, Operation, Param, Response
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
METRICS_DESCRIBE = Operation(
|
|
10
|
+
operation_id='metrics_describe',
|
|
11
|
+
noun='metrics',
|
|
12
|
+
verb='describe',
|
|
13
|
+
method='get',
|
|
14
|
+
path='/api/semantic/projects/{project_id}/metrics/{metric}',
|
|
15
|
+
summary='Get Metric',
|
|
16
|
+
description='Describe one metric you can query.',
|
|
17
|
+
project='path:project_id',
|
|
18
|
+
destructive=False,
|
|
19
|
+
idempotent=False,
|
|
20
|
+
since='1.0',
|
|
21
|
+
params=(
|
|
22
|
+
Param(
|
|
23
|
+
name='project_id',
|
|
24
|
+
location='path',
|
|
25
|
+
kind='string',
|
|
26
|
+
required=True,
|
|
27
|
+
description='Project Id',
|
|
28
|
+
),
|
|
29
|
+
Param(
|
|
30
|
+
name='metric',
|
|
31
|
+
location='path',
|
|
32
|
+
kind='string',
|
|
33
|
+
required=True,
|
|
34
|
+
description='Metric',
|
|
35
|
+
),
|
|
36
|
+
),
|
|
37
|
+
body=None,
|
|
38
|
+
response=Response(
|
|
39
|
+
kind='json',
|
|
40
|
+
model='metrics:MetricOut',
|
|
41
|
+
shape='object',
|
|
42
|
+
),
|
|
43
|
+
examples=(
|
|
44
|
+
'databay metrics describe net_sales',
|
|
45
|
+
),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
METRICS_LIST = Operation(
|
|
49
|
+
operation_id='metrics_list',
|
|
50
|
+
noun='metrics',
|
|
51
|
+
verb='list',
|
|
52
|
+
method='get',
|
|
53
|
+
path='/api/semantic/projects/{project_id}/metrics',
|
|
54
|
+
summary='Get Metrics',
|
|
55
|
+
description='List the metrics you can query, each with its dimensions, grains, warehouses and state.',
|
|
56
|
+
project='path:project_id',
|
|
57
|
+
destructive=False,
|
|
58
|
+
idempotent=False,
|
|
59
|
+
since='1.0',
|
|
60
|
+
params=(
|
|
61
|
+
Param(
|
|
62
|
+
name='project_id',
|
|
63
|
+
location='path',
|
|
64
|
+
kind='string',
|
|
65
|
+
required=True,
|
|
66
|
+
description='Project Id',
|
|
67
|
+
),
|
|
68
|
+
),
|
|
69
|
+
body=None,
|
|
70
|
+
response=Response(
|
|
71
|
+
kind='json',
|
|
72
|
+
model='metrics:MetricListOut',
|
|
73
|
+
shape='object',
|
|
74
|
+
),
|
|
75
|
+
examples=(
|
|
76
|
+
'databay metrics list',
|
|
77
|
+
),
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
METRICS_QUERY = Operation(
|
|
81
|
+
operation_id='metrics_query',
|
|
82
|
+
noun='metrics',
|
|
83
|
+
verb='query',
|
|
84
|
+
method='post',
|
|
85
|
+
path='/api/semantic/projects/{project_id}/metrics/query',
|
|
86
|
+
summary='Post Metric Query',
|
|
87
|
+
description="Query one metric, or several of one cube (``metrics``), by dimensions and time grain.\n\n``explain`` adds the metric's definition, SQL and lineage, for one metric only.\n\n``dry_run`` answers the explain without running the query. ``rows`` hold at most ``limit`` rows, and\n``truncated`` says when there were more.",
|
|
88
|
+
project='path:project_id',
|
|
89
|
+
destructive=False,
|
|
90
|
+
idempotent=False,
|
|
91
|
+
since='1.0',
|
|
92
|
+
params=(
|
|
93
|
+
Param(
|
|
94
|
+
name='project_id',
|
|
95
|
+
location='path',
|
|
96
|
+
kind='string',
|
|
97
|
+
required=True,
|
|
98
|
+
description='Project Id',
|
|
99
|
+
),
|
|
100
|
+
Param(
|
|
101
|
+
name='X-Databay-Caller',
|
|
102
|
+
location='header',
|
|
103
|
+
kind='string',
|
|
104
|
+
required=False,
|
|
105
|
+
description='X-Databay-Caller',
|
|
106
|
+
choices=(
|
|
107
|
+
'cli',
|
|
108
|
+
'agent',
|
|
109
|
+
'api',
|
|
110
|
+
),
|
|
111
|
+
nullable=True,
|
|
112
|
+
),
|
|
113
|
+
),
|
|
114
|
+
body=Body(
|
|
115
|
+
schema='MetricQuery',
|
|
116
|
+
fields=(
|
|
117
|
+
Param(
|
|
118
|
+
name='dimensions',
|
|
119
|
+
location='body',
|
|
120
|
+
kind='list',
|
|
121
|
+
required=False,
|
|
122
|
+
description='Dimensions',
|
|
123
|
+
item_kind='string',
|
|
124
|
+
),
|
|
125
|
+
Param(
|
|
126
|
+
name='dry_run',
|
|
127
|
+
location='body',
|
|
128
|
+
kind='boolean',
|
|
129
|
+
required=False,
|
|
130
|
+
description='Dry Run',
|
|
131
|
+
),
|
|
132
|
+
Param(
|
|
133
|
+
name='explain',
|
|
134
|
+
location='body',
|
|
135
|
+
kind='boolean',
|
|
136
|
+
required=False,
|
|
137
|
+
description='Explain',
|
|
138
|
+
),
|
|
139
|
+
Param(
|
|
140
|
+
name='filters',
|
|
141
|
+
location='body',
|
|
142
|
+
kind='json',
|
|
143
|
+
required=False,
|
|
144
|
+
description='Filters',
|
|
145
|
+
),
|
|
146
|
+
Param(
|
|
147
|
+
name='limit',
|
|
148
|
+
location='body',
|
|
149
|
+
kind='integer',
|
|
150
|
+
required=False,
|
|
151
|
+
description='Limit',
|
|
152
|
+
),
|
|
153
|
+
Param(
|
|
154
|
+
name='metric',
|
|
155
|
+
location='body',
|
|
156
|
+
kind='string',
|
|
157
|
+
required=False,
|
|
158
|
+
description='Metric',
|
|
159
|
+
nullable=True,
|
|
160
|
+
),
|
|
161
|
+
Param(
|
|
162
|
+
name='metrics',
|
|
163
|
+
location='body',
|
|
164
|
+
kind='list',
|
|
165
|
+
required=False,
|
|
166
|
+
description='Metrics',
|
|
167
|
+
item_kind='string',
|
|
168
|
+
nullable=True,
|
|
169
|
+
),
|
|
170
|
+
Param(
|
|
171
|
+
name='model_version',
|
|
172
|
+
location='body',
|
|
173
|
+
kind='integer',
|
|
174
|
+
required=False,
|
|
175
|
+
description='Model Version',
|
|
176
|
+
nullable=True,
|
|
177
|
+
),
|
|
178
|
+
Param(
|
|
179
|
+
name='order',
|
|
180
|
+
location='body',
|
|
181
|
+
kind='json',
|
|
182
|
+
required=False,
|
|
183
|
+
description='Order',
|
|
184
|
+
),
|
|
185
|
+
Param(
|
|
186
|
+
name='time',
|
|
187
|
+
location='body',
|
|
188
|
+
kind='json',
|
|
189
|
+
required=False,
|
|
190
|
+
nullable=True,
|
|
191
|
+
),
|
|
192
|
+
Param(
|
|
193
|
+
name='warehouse',
|
|
194
|
+
location='body',
|
|
195
|
+
kind='string',
|
|
196
|
+
required=False,
|
|
197
|
+
description='Warehouse',
|
|
198
|
+
nullable=True,
|
|
199
|
+
),
|
|
200
|
+
),
|
|
201
|
+
),
|
|
202
|
+
response=Response(
|
|
203
|
+
kind='json',
|
|
204
|
+
model='metrics:MetricQueryOut',
|
|
205
|
+
shape='object',
|
|
206
|
+
),
|
|
207
|
+
examples=(
|
|
208
|
+
'databay metrics query net_sales --grain day --last 30d',
|
|
209
|
+
'databay metrics query channel_sessions --by channel --grain week --last 90d --where channel=Direct',
|
|
210
|
+
'databay metrics query net_sales --grain day --last 30d --explain',
|
|
211
|
+
),
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
OPERATIONS = (
|
|
215
|
+
METRICS_DESCRIBE,
|
|
216
|
+
METRICS_LIST,
|
|
217
|
+
METRICS_QUERY,
|
|
218
|
+
)
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"""The ``models`` operations.
|
|
2
|
+
|
|
3
|
+
Generated by python/tools/gen_client.py from contract/core.json; do not edit.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from databay.operation import Body, Operation, Param, Response, Verdict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
MODELS_CHECK = Operation(
|
|
10
|
+
operation_id='models_check',
|
|
11
|
+
noun='models',
|
|
12
|
+
verb='check',
|
|
13
|
+
method='post',
|
|
14
|
+
path='/api/elt/git/connection/check',
|
|
15
|
+
summary='Check',
|
|
16
|
+
description="Check a branch's tip as a sync would, with ``EXPLAIN ESTIMATE`` advice; nothing is applied or built.",
|
|
17
|
+
project='header',
|
|
18
|
+
destructive=False,
|
|
19
|
+
idempotent=False,
|
|
20
|
+
since='1.0',
|
|
21
|
+
params=(),
|
|
22
|
+
body=Body(
|
|
23
|
+
schema='BranchCheckRequest',
|
|
24
|
+
fields=(
|
|
25
|
+
Param(
|
|
26
|
+
name='ref',
|
|
27
|
+
location='body',
|
|
28
|
+
kind='string',
|
|
29
|
+
required=True,
|
|
30
|
+
description='Ref',
|
|
31
|
+
),
|
|
32
|
+
),
|
|
33
|
+
),
|
|
34
|
+
response=Response(
|
|
35
|
+
kind='json',
|
|
36
|
+
model='models:CommitCheck',
|
|
37
|
+
shape='object',
|
|
38
|
+
),
|
|
39
|
+
examples=(
|
|
40
|
+
'databay models check --ref main',
|
|
41
|
+
),
|
|
42
|
+
columns=(
|
|
43
|
+
'commit',
|
|
44
|
+
'passed',
|
|
45
|
+
'problems',
|
|
46
|
+
),
|
|
47
|
+
verdict=Verdict(
|
|
48
|
+
field='/passed',
|
|
49
|
+
ok=(
|
|
50
|
+
'true',
|
|
51
|
+
),
|
|
52
|
+
not_ready=(
|
|
53
|
+
'false',
|
|
54
|
+
),
|
|
55
|
+
),
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
MODELS_SYNC = Operation(
|
|
59
|
+
operation_id='models_sync',
|
|
60
|
+
noun='models',
|
|
61
|
+
verb='sync',
|
|
62
|
+
method='post',
|
|
63
|
+
path='/api/elt/git/connection/sync',
|
|
64
|
+
summary='Sync Now',
|
|
65
|
+
description='Read the branch on the next pass; its outcome shows in the status.',
|
|
66
|
+
project='header',
|
|
67
|
+
destructive=False,
|
|
68
|
+
idempotent=False,
|
|
69
|
+
since='1.0',
|
|
70
|
+
params=(),
|
|
71
|
+
body=None,
|
|
72
|
+
response=Response(
|
|
73
|
+
kind='json',
|
|
74
|
+
model='models:GitConnectionOut',
|
|
75
|
+
shape='object',
|
|
76
|
+
),
|
|
77
|
+
examples=(
|
|
78
|
+
'databay models sync',
|
|
79
|
+
),
|
|
80
|
+
columns=(
|
|
81
|
+
'applied_commit',
|
|
82
|
+
'next_sync_at',
|
|
83
|
+
'error',
|
|
84
|
+
),
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
MODELS_SYNC_STATUS = Operation(
|
|
88
|
+
operation_id='models_sync_status',
|
|
89
|
+
noun='models',
|
|
90
|
+
verb='sync-status',
|
|
91
|
+
method='get',
|
|
92
|
+
path='/api/elt/git/connection',
|
|
93
|
+
summary='Connection Status',
|
|
94
|
+
description='',
|
|
95
|
+
project='header',
|
|
96
|
+
destructive=False,
|
|
97
|
+
idempotent=False,
|
|
98
|
+
since='1.0',
|
|
99
|
+
params=(),
|
|
100
|
+
body=None,
|
|
101
|
+
response=Response(
|
|
102
|
+
kind='json',
|
|
103
|
+
model='models:GitConnectionOut',
|
|
104
|
+
shape='object',
|
|
105
|
+
),
|
|
106
|
+
examples=(
|
|
107
|
+
'databay models sync-status',
|
|
108
|
+
),
|
|
109
|
+
columns=(
|
|
110
|
+
'repo_url',
|
|
111
|
+
'branch',
|
|
112
|
+
'folder',
|
|
113
|
+
'applied_commit',
|
|
114
|
+
'last_sync_at',
|
|
115
|
+
'error',
|
|
116
|
+
),
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
OPERATIONS = (
|
|
120
|
+
MODELS_CHECK,
|
|
121
|
+
MODELS_SYNC,
|
|
122
|
+
MODELS_SYNC_STATUS,
|
|
123
|
+
)
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"""The ``nlq`` operations.
|
|
2
|
+
|
|
3
|
+
Generated by python/tools/gen_client.py from contract/core.json; do not edit.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from databay.operation import Body, Operation, Param, Response
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
NLQ_ASK = Operation(
|
|
10
|
+
operation_id='nlq_ask',
|
|
11
|
+
noun='nlq',
|
|
12
|
+
verb='ask',
|
|
13
|
+
method='post',
|
|
14
|
+
path='/api/nlq/ask',
|
|
15
|
+
summary='Ask',
|
|
16
|
+
description='',
|
|
17
|
+
project='header',
|
|
18
|
+
destructive=False,
|
|
19
|
+
idempotent=False,
|
|
20
|
+
since='1.0',
|
|
21
|
+
params=(),
|
|
22
|
+
body=Body(
|
|
23
|
+
schema='AskRequest',
|
|
24
|
+
fields=(
|
|
25
|
+
Param(
|
|
26
|
+
name='conversation_id',
|
|
27
|
+
location='body',
|
|
28
|
+
kind='string',
|
|
29
|
+
required=False,
|
|
30
|
+
description="The caller's conversation this question continues; its last turns are the follow-up context. Null starts a new conversation.",
|
|
31
|
+
nullable=True,
|
|
32
|
+
),
|
|
33
|
+
Param(
|
|
34
|
+
name='database_name',
|
|
35
|
+
location='body',
|
|
36
|
+
kind='string',
|
|
37
|
+
required=False,
|
|
38
|
+
description="Optional ClickHouse database (schema) on the selected connection. When set, the assistant looks for the question's tables in this database.",
|
|
39
|
+
nullable=True,
|
|
40
|
+
),
|
|
41
|
+
Param(
|
|
42
|
+
name='database_uuid',
|
|
43
|
+
location='body',
|
|
44
|
+
kind='string',
|
|
45
|
+
required=True,
|
|
46
|
+
description='UUID of the database connection to query against',
|
|
47
|
+
),
|
|
48
|
+
Param(
|
|
49
|
+
name='history',
|
|
50
|
+
location='body',
|
|
51
|
+
kind='json',
|
|
52
|
+
required=False,
|
|
53
|
+
description='Up to three earlier turns, oldest first, for a question outside any stored conversation',
|
|
54
|
+
),
|
|
55
|
+
Param(
|
|
56
|
+
name='question',
|
|
57
|
+
location='body',
|
|
58
|
+
kind='string',
|
|
59
|
+
required=True,
|
|
60
|
+
description='Natural language question',
|
|
61
|
+
),
|
|
62
|
+
),
|
|
63
|
+
),
|
|
64
|
+
response=Response(
|
|
65
|
+
kind='json',
|
|
66
|
+
model='nlq:NlqAskResponse',
|
|
67
|
+
),
|
|
68
|
+
examples=(
|
|
69
|
+
'databay nlq ask --database-uuid <db_uuid> --question "How many orders did we get last week?"',
|
|
70
|
+
),
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
NLQ_USAGE = Operation(
|
|
74
|
+
operation_id='nlq_usage',
|
|
75
|
+
noun='nlq',
|
|
76
|
+
verb='usage',
|
|
77
|
+
method='get',
|
|
78
|
+
path='/api/nlq/usage',
|
|
79
|
+
summary='Usage',
|
|
80
|
+
description='',
|
|
81
|
+
project=None,
|
|
82
|
+
destructive=False,
|
|
83
|
+
idempotent=False,
|
|
84
|
+
since='1.0',
|
|
85
|
+
params=(),
|
|
86
|
+
body=None,
|
|
87
|
+
response=Response(
|
|
88
|
+
kind='json',
|
|
89
|
+
model='nlq:AiUsageResponse',
|
|
90
|
+
shape='object',
|
|
91
|
+
),
|
|
92
|
+
examples=(
|
|
93
|
+
'databay nlq usage',
|
|
94
|
+
),
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
OPERATIONS = (
|
|
98
|
+
NLQ_ASK,
|
|
99
|
+
NLQ_USAGE,
|
|
100
|
+
)
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""The ``notebook-credential`` operations.
|
|
2
|
+
|
|
3
|
+
Generated by python/tools/gen_client.py from contract/core.json; do not edit.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from databay.operation import Operation, Param, Response
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
NOTEBOOK_CREDENTIAL_GET_BINDING = Operation(
|
|
10
|
+
operation_id='notebook_credential_get_binding',
|
|
11
|
+
noun='notebook-credential',
|
|
12
|
+
verb='get-binding',
|
|
13
|
+
method='get',
|
|
14
|
+
path='/api/configstore/notebook-credentials/binding',
|
|
15
|
+
summary='Notebook Binding',
|
|
16
|
+
description='Name the project of the caller\'s most recent notebook issuance (``last_used_at``).\n\nLets the UI show which project a running server uses and offer "Restart in {new}".\nWith ``project_id`` (the notebook server, about the server it is running), answer for that project\ninstead: launching from another project issues that project\'s reader first, so the\nlatest issuance is no longer the server\'s project. The project is re-checked live and\nomitted when the caller can no longer view it, so the route never names a project the\ncaller lost.',
|
|
17
|
+
project=None,
|
|
18
|
+
destructive=False,
|
|
19
|
+
idempotent=False,
|
|
20
|
+
since='1.0',
|
|
21
|
+
params=(
|
|
22
|
+
Param(
|
|
23
|
+
name='project_id',
|
|
24
|
+
location='query',
|
|
25
|
+
kind='string',
|
|
26
|
+
required=False,
|
|
27
|
+
description="answer for this project (the running server's) instead of the latest",
|
|
28
|
+
nullable=True,
|
|
29
|
+
),
|
|
30
|
+
),
|
|
31
|
+
body=None,
|
|
32
|
+
response=Response(
|
|
33
|
+
kind='json',
|
|
34
|
+
model='notebook_credential:NotebookBindingResponse',
|
|
35
|
+
shape='object',
|
|
36
|
+
),
|
|
37
|
+
examples=(
|
|
38
|
+
'databay notebook-credential get-binding',
|
|
39
|
+
'databay notebook-credential get-binding --project-id <project_id>',
|
|
40
|
+
),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
NOTEBOOK_CREDENTIAL_ISSUE = Operation(
|
|
44
|
+
operation_id='notebook_credential_issue',
|
|
45
|
+
noun='notebook-credential',
|
|
46
|
+
verb='issue',
|
|
47
|
+
method='post',
|
|
48
|
+
path='/api/configstore/notebook-credentials',
|
|
49
|
+
summary='Notebook Credentials',
|
|
50
|
+
description="Issue notebook ClickHouse credentials for the caller.\n\nPOST because it provisions. Idempotent: the same credentials come back every time,\nbecause this runs on every notebook spawn and rotating here would invalidate a running\nkernel. Rotation is the ``renew`` route.\n\nThe caller's own reader in the active project (``X-Databay-Project-ID``; the notebook server\nforwards it), whose grants are exactly the project's visible managed warehouses plus the project scratch.",
|
|
51
|
+
project='header',
|
|
52
|
+
destructive=False,
|
|
53
|
+
idempotent=False,
|
|
54
|
+
since='1.0',
|
|
55
|
+
params=(),
|
|
56
|
+
body=None,
|
|
57
|
+
response=Response(
|
|
58
|
+
kind='json',
|
|
59
|
+
model='notebook_credential:NotebookCredentialsResponse',
|
|
60
|
+
shape='object',
|
|
61
|
+
),
|
|
62
|
+
examples=(
|
|
63
|
+
'databay notebook-credential issue',
|
|
64
|
+
),
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
NOTEBOOK_CREDENTIAL_RENEW = Operation(
|
|
68
|
+
operation_id='notebook_credential_renew',
|
|
69
|
+
noun='notebook-credential',
|
|
70
|
+
verb='renew',
|
|
71
|
+
method='post',
|
|
72
|
+
path='/api/configstore/notebook-credentials/renew',
|
|
73
|
+
summary='Renew Notebook Credentials',
|
|
74
|
+
description="Mint a new notebook password.\n\nRotates only the caller's reader in the active project; READER is enough because nobody\nelse's kernel is affected.",
|
|
75
|
+
project='header',
|
|
76
|
+
destructive=True,
|
|
77
|
+
idempotent=False,
|
|
78
|
+
since='1.0',
|
|
79
|
+
params=(),
|
|
80
|
+
body=None,
|
|
81
|
+
response=Response(
|
|
82
|
+
kind='json',
|
|
83
|
+
model='notebook_credential:NotebookCredentialsRotateResponse',
|
|
84
|
+
shape='object',
|
|
85
|
+
),
|
|
86
|
+
examples=(
|
|
87
|
+
'databay notebook-credential renew --yes',
|
|
88
|
+
),
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
OPERATIONS = (
|
|
92
|
+
NOTEBOOK_CREDENTIAL_GET_BINDING,
|
|
93
|
+
NOTEBOOK_CREDENTIAL_ISSUE,
|
|
94
|
+
NOTEBOOK_CREDENTIAL_RENEW,
|
|
95
|
+
)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"""The ``org`` operations.
|
|
2
|
+
|
|
3
|
+
Generated by python/tools/gen_client.py from contract/core.json; do not edit.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from databay.operation import Body, Operation, Param, Response
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
ORG_LIST = Operation(
|
|
10
|
+
operation_id='org_list',
|
|
11
|
+
noun='org',
|
|
12
|
+
verb='list',
|
|
13
|
+
method='get',
|
|
14
|
+
path='/api/auth/me/organizations',
|
|
15
|
+
summary='Get My Organizations',
|
|
16
|
+
description="List the organizations the caller belongs to, their role in each, and which one is stored as active.\n\n`active_org` and `is_active` are the stored choice: the organization the next refreshed token names.\nThe caller's current token may still name another one until it is refreshed. `needs_org_choice` is\ntrue when no usable organization is stored and one is usable: choose with `PUT /api/auth/me/active-org`,\nthen refresh the token. `usable_orgs` 0 means every organization is disabled, or there is none.\nAn org API key is refused with 403 `api_key_not_allowed`; 503 `auth_unavailable` means retry later.",
|
|
17
|
+
project=None,
|
|
18
|
+
destructive=False,
|
|
19
|
+
idempotent=False,
|
|
20
|
+
since='1.0',
|
|
21
|
+
params=(),
|
|
22
|
+
body=None,
|
|
23
|
+
response=Response(
|
|
24
|
+
kind='json',
|
|
25
|
+
model='org:MyOrganizationsResponse',
|
|
26
|
+
shape='object',
|
|
27
|
+
rows='/organizations',
|
|
28
|
+
),
|
|
29
|
+
examples=(
|
|
30
|
+
'databay org list',
|
|
31
|
+
),
|
|
32
|
+
columns=(
|
|
33
|
+
'organization',
|
|
34
|
+
'display_name',
|
|
35
|
+
'role',
|
|
36
|
+
'is_active',
|
|
37
|
+
'enabled',
|
|
38
|
+
),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
ORG_SWITCH = Operation(
|
|
42
|
+
operation_id='org_switch',
|
|
43
|
+
noun='org',
|
|
44
|
+
verb='switch',
|
|
45
|
+
method='put',
|
|
46
|
+
path='/api/auth/me/active-org',
|
|
47
|
+
summary='Put Active Org',
|
|
48
|
+
description="Store one of the caller's organizations as active; the token in hand still names the previous one.\n\nRefresh the token (refresh-token grant at the identity provider's token endpoint; `databay org switch`\ndoes it) and the new token names this one. Refusals:\n\n- 403 `org_not_member`: the caller does not belong to that organization;\n- 403 `org_disabled`: the organization is disabled, so no token could name it;\n- 403 `api_key_not_allowed`: the caller is an org API key, which belongs to one organization;\n- 503 `auth_unavailable`: the identity provider could not be read or written; retry later;\n- 500 `active_org_not_stored`: the identity provider dropped the choice; nothing was switched.",
|
|
49
|
+
project=None,
|
|
50
|
+
destructive=False,
|
|
51
|
+
idempotent=False,
|
|
52
|
+
since='1.0',
|
|
53
|
+
params=(),
|
|
54
|
+
body=Body(
|
|
55
|
+
schema='SwitchActiveOrgRequest',
|
|
56
|
+
fields=(
|
|
57
|
+
Param(
|
|
58
|
+
name='organization',
|
|
59
|
+
location='body',
|
|
60
|
+
kind='string',
|
|
61
|
+
required=True,
|
|
62
|
+
description='The organization key to make active.',
|
|
63
|
+
),
|
|
64
|
+
),
|
|
65
|
+
),
|
|
66
|
+
response=Response(
|
|
67
|
+
kind='json',
|
|
68
|
+
model='org:ActiveOrgResponse',
|
|
69
|
+
shape='object',
|
|
70
|
+
),
|
|
71
|
+
examples=(
|
|
72
|
+
'databay org switch <organization>',
|
|
73
|
+
),
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
OPERATIONS = (
|
|
77
|
+
ORG_LIST,
|
|
78
|
+
ORG_SWITCH,
|
|
79
|
+
)
|