bigeye-cli 0.7.2__tar.gz → 0.7.4__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.
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/PKG-INFO +5 -5
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/CLI_DOCS.md +4 -4
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/catalog/catalog_commands.py +3 -3
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/configure/configure_commands.py +10 -21
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/functions.py +8 -3
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/metric/metric_commands.py +23 -10
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/pyproject.toml +1 -1
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/LICENSE +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/__main__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/__version__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/bigconfig/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/bigconfig/bigconfig_commands.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/bigconfig/bigconfig_options.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/catalog/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/collections/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/collections/collection_commands.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/configure/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/deltas/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/deltas/deltas_commands.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/enums.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/exceptions/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/exceptions/exceptions.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/global_options.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/issues/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/issues/issue_commands.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/lineage/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/lineage/lineage_commands.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/metric/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/model/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/model/cicd_conf.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/model/github_report.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/model/vendor_report.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/workspace/__init__.py +0 -0
- {bigeye_cli-0.7.2 → bigeye_cli-0.7.4}/bigeye_cli/workspace/workspace_commands.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: bigeye-cli
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.4
|
|
4
4
|
Summary: Bigeye CLI offers developer tools for maintaining your developer workspace.
|
|
5
5
|
Home-page: https://docs.bigeye.com/docs
|
|
6
6
|
License: Proprietary
|
|
@@ -18,7 +18,7 @@ Requires-Dist: rich (>=14.1.0,<15.0.0)
|
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
|
|
20
20
|
# **Bigeye CLI**
|
|
21
|
-
Version: 0.7.
|
|
21
|
+
Version: 0.7.4
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
24
24
|
**Setting up your local/build environment**
|
|
@@ -709,7 +709,7 @@ $ bigeye catalog [OPTIONS] COMMAND [ARGS]...
|
|
|
709
709
|
|
|
710
710
|
**Commands**:
|
|
711
711
|
|
|
712
|
-
* `regen-autometrics`: Regenerates Autometrics by warehouse id OR...
|
|
712
|
+
* `regen-autometrics`: Regenerates Autometrics by warehouse id OR... (DEPRECATED)
|
|
713
713
|
* `delete-metrics`: Delete metrics in a warehouse id, by...
|
|
714
714
|
* `rebuild`: Rebuilds/Reprofiles a source by warehouse...
|
|
715
715
|
* `get-table-info`: Outputs table info to a file for an entire...
|
|
@@ -721,8 +721,8 @@ $ bigeye catalog [OPTIONS] COMMAND [ARGS]...
|
|
|
721
721
|
* `backfill-metrics`: Backfills metrics by warehouse id, schema...
|
|
722
722
|
* `schedule-all-metrics`: Updates schedule for all metrics in a...
|
|
723
723
|
* `unschedule-all-metrics`: Unschedule all metrics by warehouse,...
|
|
724
|
-
* `set-metric-time`: Sets metric times from a list of possible...
|
|
725
|
-
* `unset-metric-time`: Unsets metric times for whole warehouse or...
|
|
724
|
+
* `set-metric-time`: Sets metric times from a list of possible... (DEPRECATED)
|
|
725
|
+
* `unset-metric-time`: Unsets metric times for whole warehouse or... (DEPRECATED)
|
|
726
726
|
* `get-metric-queries`: Gets the debug queries for all metrics by...
|
|
727
727
|
* `upsert-template`: Create or update a template for a source.
|
|
728
728
|
* `export-metric-template`: Export metric templates to yaml files
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# **Bigeye CLI**
|
|
2
|
-
Version: 0.7.
|
|
2
|
+
Version: 0.7.4
|
|
3
3
|
## Installation
|
|
4
4
|
|
|
5
5
|
**Setting up your local/build environment**
|
|
@@ -690,7 +690,7 @@ $ bigeye catalog [OPTIONS] COMMAND [ARGS]...
|
|
|
690
690
|
|
|
691
691
|
**Commands**:
|
|
692
692
|
|
|
693
|
-
* `regen-autometrics`: Regenerates Autometrics by warehouse id OR...
|
|
693
|
+
* `regen-autometrics`: Regenerates Autometrics by warehouse id OR... (DEPRECATED)
|
|
694
694
|
* `delete-metrics`: Delete metrics in a warehouse id, by...
|
|
695
695
|
* `rebuild`: Rebuilds/Reprofiles a source by warehouse...
|
|
696
696
|
* `get-table-info`: Outputs table info to a file for an entire...
|
|
@@ -702,8 +702,8 @@ $ bigeye catalog [OPTIONS] COMMAND [ARGS]...
|
|
|
702
702
|
* `backfill-metrics`: Backfills metrics by warehouse id, schema...
|
|
703
703
|
* `schedule-all-metrics`: Updates schedule for all metrics in a...
|
|
704
704
|
* `unschedule-all-metrics`: Unschedule all metrics by warehouse,...
|
|
705
|
-
* `set-metric-time`: Sets metric times from a list of possible...
|
|
706
|
-
* `unset-metric-time`: Unsets metric times for whole warehouse or...
|
|
705
|
+
* `set-metric-time`: Sets metric times from a list of possible... (DEPRECATED)
|
|
706
|
+
* `unset-metric-time`: Unsets metric times for whole warehouse or... (DEPRECATED)
|
|
707
707
|
* `get-metric-queries`: Gets the debug queries for all metrics by...
|
|
708
708
|
* `upsert-template`: Create or update a template for a source.
|
|
709
709
|
* `export-metric-template`: Export metric templates to yaml files
|
|
@@ -72,7 +72,7 @@ would include metrics batched at any of these levels.
|
|
|
72
72
|
"""
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
@app.command()
|
|
75
|
+
@app.command(deprecated=True)
|
|
76
76
|
def regen_autometrics(
|
|
77
77
|
bigeye_conf: str = global_options.bigeye_conf,
|
|
78
78
|
config_file: str = global_options.config_file,
|
|
@@ -629,7 +629,7 @@ def unschedule_all_metrics(
|
|
|
629
629
|
response = client._call_datawatch(Method.POST, url=url, body=json.dumps(body))
|
|
630
630
|
|
|
631
631
|
|
|
632
|
-
@app.command()
|
|
632
|
+
@app.command(deprecated=True)
|
|
633
633
|
def set_metric_time(
|
|
634
634
|
bigeye_conf: str = global_options.bigeye_conf,
|
|
635
635
|
config_file: str = global_options.config_file,
|
|
@@ -676,7 +676,7 @@ def set_metric_time(
|
|
|
676
676
|
raise Exception("Must include either table IDs OR warehouse ID OR schema ID.")
|
|
677
677
|
|
|
678
678
|
|
|
679
|
-
@app.command()
|
|
679
|
+
@app.command(deprecated=True)
|
|
680
680
|
def unset_metric_time(
|
|
681
681
|
bigeye_conf: str = global_options.bigeye_conf,
|
|
682
682
|
config_file: str = global_options.config_file,
|
|
@@ -2,17 +2,15 @@ import typer
|
|
|
2
2
|
from rich import print
|
|
3
3
|
from rich.table import Table
|
|
4
4
|
from rich.text import Text
|
|
5
|
-
from typing import List
|
|
6
5
|
|
|
7
6
|
from bigeye_cli.functions import run_enum_menu, get_workspaces_for_user, get_workspace_id_for_user
|
|
8
7
|
from bigeye_cli import global_options
|
|
9
8
|
|
|
10
|
-
from bigeye_sdk.authentication.enums import AuthConfType
|
|
11
|
-
from bigeye_sdk.authentication.api_authentication import BasicAPIAuth,
|
|
9
|
+
from bigeye_sdk.authentication.enums import AuthConfType
|
|
10
|
+
from bigeye_sdk.authentication.api_authentication import BasicAPIAuth, ApiAuth, APIKeyAuth
|
|
12
11
|
from bigeye_sdk.authentication.config import Config
|
|
13
|
-
from bigeye_sdk.client.datawatch_client import
|
|
14
|
-
|
|
15
|
-
from bigeye_sdk.exceptions.exceptions import WorkspaceNotSetException
|
|
12
|
+
from bigeye_sdk.client.datawatch_client import create_api_key_for_configuration
|
|
13
|
+
|
|
16
14
|
|
|
17
15
|
from bigeye_sdk.log import get_logger
|
|
18
16
|
|
|
@@ -40,22 +38,13 @@ def configure(
|
|
|
40
38
|
# If configuring the default workspace or user specifically asked to enter creds, then perform credential
|
|
41
39
|
# workflow
|
|
42
40
|
if workspace == 'DEFAULT' or not use_default_credential:
|
|
43
|
-
auth_type = run_enum_menu(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
browser_profile_user_name = None
|
|
49
|
-
|
|
50
|
-
if browser_type == BrowserType.CHROME:
|
|
51
|
-
# TODO Could condition on path containing Profile_N directories.
|
|
52
|
-
browser_profile_user_name = Prompt.ask(
|
|
53
|
-
"Enter the profile email if logged into Chrome (Default: None)")
|
|
54
|
-
base_url = Prompt.ask("Enter the Bigeye URL", default="https://app.bigeye.com")
|
|
55
|
-
cred = BrowserAPIAuth(browser=browser_type, base_url=base_url,
|
|
56
|
-
browser_profile_user_name=browser_profile_user_name)
|
|
41
|
+
auth_type = run_enum_menu(
|
|
42
|
+
enum_clz=AuthConfType,
|
|
43
|
+
default=AuthConfType.API_KEY_AUTH,
|
|
44
|
+
exclude=[AuthConfType.BROWSER_AUTH]
|
|
45
|
+
)
|
|
57
46
|
|
|
58
|
-
|
|
47
|
+
if auth_type == AuthConfType.API_KEY_AUTH:
|
|
59
48
|
base_url = Prompt.ask("Enter the Bigeye URL", default="https://app.bigeye.com")
|
|
60
49
|
username = Prompt.ask("Enter Bigeye username")
|
|
61
50
|
uses_sso = Confirm.ask("Do you use SSO to access the Bigeye UI?")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import enum
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
-
from typing import List, Dict, Optional
|
|
4
|
+
from typing import List, Dict, Optional, TypeVar, Type
|
|
5
5
|
import typer
|
|
6
6
|
import yaml
|
|
7
7
|
from rich.prompt import Prompt
|
|
@@ -219,8 +219,13 @@ def write_yaml_templates(metric_templates: List[MetricTemplate], output_path: Op
|
|
|
219
219
|
yaml.dump(data, outfile, indent=2, width=1000)
|
|
220
220
|
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
E = TypeVar('E', bound=StrEnum)
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
def run_enum_menu(enum_clz: Type[E], default: E, exclude: Optional[List[E]] = None) -> E:
|
|
226
|
+
exclude = exclude or []
|
|
227
|
+
available_values = [v for v in enum_clz if v not in exclude]
|
|
228
|
+
valid_types: Dict[int, StrEnum] = {index: auth_type for index, auth_type in enumerate(available_values, start=1)}
|
|
224
229
|
valid_type_by_type: Dict[StrEnum, int] = {v: k for k, v in valid_types.items()}
|
|
225
230
|
|
|
226
231
|
user_chosen_type_ix = 0
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
import warnings
|
|
3
|
+
from collections import defaultdict
|
|
3
4
|
from os import listdir
|
|
4
5
|
from os.path import join, isfile
|
|
5
6
|
from typing import List, Dict
|
|
6
7
|
|
|
7
8
|
import smart_open
|
|
8
9
|
import typer
|
|
9
|
-
|
|
10
|
+
|
|
10
11
|
from pathlib import Path
|
|
11
12
|
|
|
12
13
|
import yaml
|
|
@@ -16,7 +17,6 @@ from bigeye_cli.enums import MetricFileType
|
|
|
16
17
|
from bigeye_sdk.controller.metric_controller import MetricController
|
|
17
18
|
from bigeye_sdk.functions.metric_functions import get_file_name_for_metric
|
|
18
19
|
from bigeye_sdk.functions.bigconfig_functions import build_fq_name
|
|
19
|
-
from bigeye_sdk.generated.com.bigeye.models._generated_root import NamedSchedule
|
|
20
20
|
from bigeye_sdk.model.dbt_schema import (
|
|
21
21
|
SimpleDbtSchema,
|
|
22
22
|
relationships_test_names,
|
|
@@ -37,9 +37,10 @@ from bigeye_cli.functions import (
|
|
|
37
37
|
from bigeye_sdk.generated.com.bigeye.models.generated import (
|
|
38
38
|
MetricInfoList,
|
|
39
39
|
MetricInfo,
|
|
40
|
-
TableList,
|
|
41
40
|
Table,
|
|
42
41
|
MetricConfiguration,
|
|
42
|
+
NamedSchedule,
|
|
43
|
+
TemplateMetric
|
|
43
44
|
)
|
|
44
45
|
from bigeye_sdk.model.big_config import BigConfig, TagDeployment, ColumnSelector
|
|
45
46
|
from bigeye_sdk.model.metric_facade import SimpleUpsertMetricRequest
|
|
@@ -177,6 +178,7 @@ def upsert_from_path(
|
|
|
177
178
|
).tables
|
|
178
179
|
|
|
179
180
|
t_ix: Dict[str, Table] = {t.name: t for t in tables}
|
|
181
|
+
c_ix: Dict[str, List[int]] = defaultdict(list)
|
|
180
182
|
|
|
181
183
|
if set_row_creation_time:
|
|
182
184
|
warnings.warn(
|
|
@@ -201,9 +203,10 @@ def upsert_from_path(
|
|
|
201
203
|
else:
|
|
202
204
|
log.info(f"Named schedule {mc.metric_schedule.named_schedule.name} "
|
|
203
205
|
f"not found in workspace {client.config.workspace_id}. Creating...")
|
|
204
|
-
|
|
205
|
-
name=mc.metric_schedule.named_schedule.name, cron=mc.metric_schedule.named_schedule.cron)
|
|
206
|
-
|
|
206
|
+
ns = client.create_named_schedule(
|
|
207
|
+
name=mc.metric_schedule.named_schedule.name, cron=mc.metric_schedule.named_schedule.cron)
|
|
208
|
+
named_schedules[ns.name.strip().lower()] = ns.id
|
|
209
|
+
mc.metric_schedule.named_schedule = NamedSchedule(id=ns.id)
|
|
207
210
|
|
|
208
211
|
log.info(f"Updated metric configuration: {mc}")
|
|
209
212
|
|
|
@@ -211,14 +214,24 @@ def upsert_from_path(
|
|
|
211
214
|
|
|
212
215
|
if update_collections:
|
|
213
216
|
for c in m.collections:
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
+
c_ix[c.display_name].append(rmc.id)
|
|
218
|
+
except KeyError:
|
|
219
|
+
log.warning(f"Table {m.metric_metadata.dataset_name} not found in warehouse {target_warehouse_id}")
|
|
220
|
+
if m.metric_metadata.schema_name == "Bigeye Virtual Schema":
|
|
221
|
+
log.info("Virtual tables must created before migration. "
|
|
222
|
+
"Use commands 'bigeye catalog export-virtual-table' and 'bigeye catalog upsert-virtual-table'"
|
|
223
|
+
" to migrate to current workspace.")
|
|
217
224
|
|
|
218
225
|
except Exception as e:
|
|
219
226
|
log.exception(f"Error for file: {get_file_name_for_metric(m)}")
|
|
220
227
|
log.exception(e)
|
|
221
228
|
|
|
229
|
+
if c_ix:
|
|
230
|
+
log.info(f"Upserting {len(c_ix)} collections...")
|
|
231
|
+
for name, mids in c_ix.items():
|
|
232
|
+
client.upsert_metric_to_collection(collection_name=name, add_metric_ids=mids)
|
|
233
|
+
|
|
234
|
+
|
|
222
235
|
|
|
223
236
|
@app.command()
|
|
224
237
|
def upsert(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|