bigeye-cli 0.8.4__tar.gz → 0.8.6__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.8.4 → bigeye_cli-0.8.6}/PKG-INFO +8 -10
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/CLI_DOCS.md +7 -9
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/bigconfig/bigconfig_commands.py +65 -39
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/bigconfig/bigconfig_options.py +1 -1
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/catalog/catalog_commands.py +9 -5
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/enums.py +13 -2
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/lineage/lineage_commands.py +13 -24
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/metric/metric_commands.py +5 -6
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/pyproject.toml +1 -1
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/LICENSE +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/__main__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/__version__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/bigconfig/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/catalog/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/catalog/custom_repo_commands.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/collections/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/collections/collection_commands.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/configure/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/configure/configure_commands.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/deltas/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/deltas/deltas_commands.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/exceptions/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/exceptions/exceptions.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/functions.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/global_options.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/issues/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/issues/issue_commands.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/lineage/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/metric/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/model/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/model/cicd_conf.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/model/github_report.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/model/vendor_report.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/bigeye_cli/workspace/__init__.py +0 -0
- {bigeye_cli-0.8.4 → bigeye_cli-0.8.6}/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.8.
|
|
3
|
+
Version: 0.8.6
|
|
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.8.
|
|
21
|
+
Version: 0.8.6
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
24
24
|
**Setting up your local/build environment**
|
|
@@ -631,7 +631,7 @@ $ bigeye bigconfig plan [OPTIONS]
|
|
|
631
631
|
* `-op, --output_path TEXT`: Output path where reports and fixme files will be saved. If no output path is defined then current working directory will be used.
|
|
632
632
|
* `-psn, --purge_source_name TEXT`: List of source names to purge E.g. -psn source_1 -psn source_2.
|
|
633
633
|
* `-purge_all, --purge_all_sources`: Purge all sources: True or False.
|
|
634
|
-
* `-nq, --no_queue`: Don't submit to queue: True or False. [DEPRECATED]
|
|
634
|
+
* `-nq, --no_queue`: Don't submit to queue: True or False. [DEPRECATED — ignored; will be removed in 1.0]
|
|
635
635
|
* `-r, --recursive`: Search all input directories recursively.
|
|
636
636
|
* `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
|
|
637
637
|
* `-n, --namespace TEXT`: The namespace for the deployment. (This must match across all files or namespace should not be set in files)
|
|
@@ -658,7 +658,7 @@ $ bigeye bigconfig apply [OPTIONS]
|
|
|
658
658
|
* `-op, --output_path TEXT`: Output path where reports and fixme files will be saved. If no output path is defined then current working directory will be used.
|
|
659
659
|
* `-psn, --purge_source_name TEXT`: List of source names to purge E.g. -psn source_1 -psn source_2.
|
|
660
660
|
* `-purge_all, --purge_all_sources`: Purge all sources: True or False.
|
|
661
|
-
* `-nq, --no_queue`: Don't submit to queue: True or False. [DEPRECATED]
|
|
661
|
+
* `-nq, --no_queue`: Don't submit to queue: True or False. [DEPRECATED — ignored; will be removed in 1.0]
|
|
662
662
|
* `-r, --recursive`: Search all input directories recursively.
|
|
663
663
|
* `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
|
|
664
664
|
* `-auto_approve, --auto_approve`: Explicit plan approval is not needed prior to execution.
|
|
@@ -1909,8 +1909,7 @@ $ bigeye lineage create-node [OPTIONS]
|
|
|
1909
1909
|
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
1910
1910
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1911
1911
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1912
|
-
* `-en, --entity_name TEXT`: The fully qualified table name
|
|
1913
|
-
* `-in, --int_name TEXT`: The name of the BI connection (required for entities outside of Bigeye)
|
|
1912
|
+
* `-en, --entity_name TEXT`: The fully qualified table name [required]
|
|
1914
1913
|
* `--help`: Show this message and exit.
|
|
1915
1914
|
|
|
1916
1915
|
## `bigeye lineage delete-node`
|
|
@@ -1928,8 +1927,7 @@ $ bigeye lineage delete-node [OPTIONS]
|
|
|
1928
1927
|
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
1929
1928
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1930
1929
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1931
|
-
* `-en, --entity_name TEXT`: The fully qualified table name
|
|
1932
|
-
* `-in, --int_name TEXT`: The name of the BI connection (required for entities outside of Bigeye)
|
|
1930
|
+
* `-en, --entity_name TEXT`: The fully qualified table name [required]
|
|
1933
1931
|
* `--help`: Show this message and exit.
|
|
1934
1932
|
|
|
1935
1933
|
## `bigeye lineage create-relation`
|
|
@@ -1967,9 +1965,8 @@ $ bigeye lineage delete-relation [OPTIONS]
|
|
|
1967
1965
|
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
1968
1966
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1969
1967
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1970
|
-
* `-en, --entity_name TEXT`: The fully qualified table name
|
|
1968
|
+
* `-en, --entity_name TEXT`: The fully qualified table name
|
|
1971
1969
|
* `-rid, --relation_id INTEGER`: The relationship ID to delete [default: 0]
|
|
1972
|
-
* `-in, --int_name TEXT`: The name of the BI connection (required for entities outside of Bigeye)
|
|
1973
1970
|
* `--help`: Show this message and exit.
|
|
1974
1971
|
|
|
1975
1972
|
## `bigeye lineage infer-relations`
|
|
@@ -2046,6 +2043,7 @@ $ bigeye lineage export-end-to-end [OPTIONS]
|
|
|
2046
2043
|
* `--direction [upstream|downstream|both]`: Direction to trace: upstream, downstream, or both. [default: both]
|
|
2047
2044
|
* `--granularity [schema|table|column]`: Hop level: schema, table, or column. Defaults to each root's own level.
|
|
2048
2045
|
* `--max-paths INTEGER`: Per-root cap on enumerated paths. Truncation is logged, never silent. [default: 10000]
|
|
2046
|
+
* `--include-etl / --no-include-etl`: Include or exclude ETL operator nodes as hops. When excluded, paths are stitched across removed ETL nodes (A -> ETL -> C becomes A -> C). Defaults to including them. [default: include-etl]
|
|
2049
2047
|
* `--depth INTEGER`: Per-window traversal depth. When set, each root's graph is fetched in bounded depth-hop windows, re-rooting at the lineage frontier until the lineage is exhausted end-to-end. This escapes the backend's per-request depth ceiling (lineage.max_depth) that truncates a single full fetch, and keeps each request small so very large graphs don't fail. Omit to request the graph in one call (the previous behavior, capped at the backend depth limit).
|
|
2050
2048
|
* `--concurrency INTEGER`: Max concurrent window requests when --depth is used. Lower it to reduce client memory and server load on wide graphs. Ignored without --depth. [default: 8]
|
|
2051
2049
|
* `-o, --output TEXT`: Output .csv path. Defaults to end_to_end_<root>.csv in the current directory.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# **Bigeye CLI**
|
|
2
|
-
Version: 0.8.
|
|
2
|
+
Version: 0.8.6
|
|
3
3
|
## Installation
|
|
4
4
|
|
|
5
5
|
**Setting up your local/build environment**
|
|
@@ -612,7 +612,7 @@ $ bigeye bigconfig plan [OPTIONS]
|
|
|
612
612
|
* `-op, --output_path TEXT`: Output path where reports and fixme files will be saved. If no output path is defined then current working directory will be used.
|
|
613
613
|
* `-psn, --purge_source_name TEXT`: List of source names to purge E.g. -psn source_1 -psn source_2.
|
|
614
614
|
* `-purge_all, --purge_all_sources`: Purge all sources: True or False.
|
|
615
|
-
* `-nq, --no_queue`: Don't submit to queue: True or False. [DEPRECATED]
|
|
615
|
+
* `-nq, --no_queue`: Don't submit to queue: True or False. [DEPRECATED — ignored; will be removed in 1.0]
|
|
616
616
|
* `-r, --recursive`: Search all input directories recursively.
|
|
617
617
|
* `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
|
|
618
618
|
* `-n, --namespace TEXT`: The namespace for the deployment. (This must match across all files or namespace should not be set in files)
|
|
@@ -639,7 +639,7 @@ $ bigeye bigconfig apply [OPTIONS]
|
|
|
639
639
|
* `-op, --output_path TEXT`: Output path where reports and fixme files will be saved. If no output path is defined then current working directory will be used.
|
|
640
640
|
* `-psn, --purge_source_name TEXT`: List of source names to purge E.g. -psn source_1 -psn source_2.
|
|
641
641
|
* `-purge_all, --purge_all_sources`: Purge all sources: True or False.
|
|
642
|
-
* `-nq, --no_queue`: Don't submit to queue: True or False. [DEPRECATED]
|
|
642
|
+
* `-nq, --no_queue`: Don't submit to queue: True or False. [DEPRECATED — ignored; will be removed in 1.0]
|
|
643
643
|
* `-r, --recursive`: Search all input directories recursively.
|
|
644
644
|
* `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
|
|
645
645
|
* `-auto_approve, --auto_approve`: Explicit plan approval is not needed prior to execution.
|
|
@@ -1890,8 +1890,7 @@ $ bigeye lineage create-node [OPTIONS]
|
|
|
1890
1890
|
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
1891
1891
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1892
1892
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1893
|
-
* `-en, --entity_name TEXT`: The fully qualified table name
|
|
1894
|
-
* `-in, --int_name TEXT`: The name of the BI connection (required for entities outside of Bigeye)
|
|
1893
|
+
* `-en, --entity_name TEXT`: The fully qualified table name [required]
|
|
1895
1894
|
* `--help`: Show this message and exit.
|
|
1896
1895
|
|
|
1897
1896
|
## `bigeye lineage delete-node`
|
|
@@ -1909,8 +1908,7 @@ $ bigeye lineage delete-node [OPTIONS]
|
|
|
1909
1908
|
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
1910
1909
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1911
1910
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1912
|
-
* `-en, --entity_name TEXT`: The fully qualified table name
|
|
1913
|
-
* `-in, --int_name TEXT`: The name of the BI connection (required for entities outside of Bigeye)
|
|
1911
|
+
* `-en, --entity_name TEXT`: The fully qualified table name [required]
|
|
1914
1912
|
* `--help`: Show this message and exit.
|
|
1915
1913
|
|
|
1916
1914
|
## `bigeye lineage create-relation`
|
|
@@ -1948,9 +1946,8 @@ $ bigeye lineage delete-relation [OPTIONS]
|
|
|
1948
1946
|
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
1949
1947
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1950
1948
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1951
|
-
* `-en, --entity_name TEXT`: The fully qualified table name
|
|
1949
|
+
* `-en, --entity_name TEXT`: The fully qualified table name
|
|
1952
1950
|
* `-rid, --relation_id INTEGER`: The relationship ID to delete [default: 0]
|
|
1953
|
-
* `-in, --int_name TEXT`: The name of the BI connection (required for entities outside of Bigeye)
|
|
1954
1951
|
* `--help`: Show this message and exit.
|
|
1955
1952
|
|
|
1956
1953
|
## `bigeye lineage infer-relations`
|
|
@@ -2027,6 +2024,7 @@ $ bigeye lineage export-end-to-end [OPTIONS]
|
|
|
2027
2024
|
* `--direction [upstream|downstream|both]`: Direction to trace: upstream, downstream, or both. [default: both]
|
|
2028
2025
|
* `--granularity [schema|table|column]`: Hop level: schema, table, or column. Defaults to each root's own level.
|
|
2029
2026
|
* `--max-paths INTEGER`: Per-root cap on enumerated paths. Truncation is logged, never silent. [default: 10000]
|
|
2027
|
+
* `--include-etl / --no-include-etl`: Include or exclude ETL operator nodes as hops. When excluded, paths are stitched across removed ETL nodes (A -> ETL -> C becomes A -> C). Defaults to including them. [default: include-etl]
|
|
2030
2028
|
* `--depth INTEGER`: Per-window traversal depth. When set, each root's graph is fetched in bounded depth-hop windows, re-rooting at the lineage frontier until the lineage is exhausted end-to-end. This escapes the backend's per-request depth ceiling (lineage.max_depth) that truncates a single full fetch, and keeps each request small so very large graphs don't fail. Omit to request the graph in one call (the previous behavior, capped at the backend depth limit).
|
|
2031
2029
|
* `--concurrency INTEGER`: Max concurrent window requests when --depth is used. Lower it to reduce client memory and server load on wide graphs. Ignored without --depth. [default: 8]
|
|
2032
2030
|
* `-o, --output TEXT`: Output .csv path. Defaults to end_to_end_<root>.csv in the current directory.
|
|
@@ -2,7 +2,7 @@ import os
|
|
|
2
2
|
import warnings
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
from pathlib import Path
|
|
5
|
-
from typing import Optional, List
|
|
5
|
+
from typing import Optional, List, Dict
|
|
6
6
|
|
|
7
7
|
import typer
|
|
8
8
|
|
|
@@ -14,9 +14,12 @@ from bigeye_sdk.bigconfig_validation.big_config_reports import all_reports
|
|
|
14
14
|
from bigeye_sdk.controller.metric_controller import MetricController, filter_metrics_by_namespace
|
|
15
15
|
from bigeye_sdk.functions.file_functs import sanitize_filename
|
|
16
16
|
from bigeye_sdk.controller.metric_suite_controller import MetricSuiteController
|
|
17
|
-
from bigeye_sdk.generated.com.bigeye.models.generated import
|
|
17
|
+
from bigeye_sdk.generated.com.bigeye.models.generated import (
|
|
18
|
+
MetricInfoList, MetricInfo
|
|
19
|
+
)
|
|
18
20
|
from bigeye_sdk.model.big_config import BigConfig
|
|
19
21
|
from bigeye_sdk.model.protobuf_message_facade import SimpleCollection
|
|
22
|
+
from bigeye_sdk.decorators.deprecation import build_deprecation_message
|
|
20
23
|
from bigeye_sdk.log import get_logger
|
|
21
24
|
|
|
22
25
|
log = get_logger(__file__)
|
|
@@ -72,9 +75,10 @@ def plan(
|
|
|
72
75
|
)
|
|
73
76
|
else:
|
|
74
77
|
if no_queue:
|
|
75
|
-
log.warning(
|
|
76
|
-
"The --no_queue flag
|
|
77
|
-
|
|
78
|
+
log.warning(build_deprecation_message(
|
|
79
|
+
"The --no_queue flag",
|
|
80
|
+
details="The option is ignored and will be removed."
|
|
81
|
+
))
|
|
78
82
|
report = mc.execute_bigconfig(
|
|
79
83
|
input_path=input_path,
|
|
80
84
|
output_path=output_path,
|
|
@@ -128,9 +132,10 @@ def apply(
|
|
|
128
132
|
)
|
|
129
133
|
else:
|
|
130
134
|
if no_queue:
|
|
131
|
-
log.warning(
|
|
132
|
-
"The --no_queue flag
|
|
133
|
-
|
|
135
|
+
log.warning(build_deprecation_message(
|
|
136
|
+
"The --no_queue flag",
|
|
137
|
+
details="The option is ignored and will be removed."
|
|
138
|
+
))
|
|
134
139
|
mc.execute_bigconfig(
|
|
135
140
|
input_path=input_path,
|
|
136
141
|
output_path=output_path,
|
|
@@ -192,6 +197,14 @@ def export(
|
|
|
192
197
|
"collection id (-cid), table id (-tid), or list of metric ids (-mid). "
|
|
193
198
|
)
|
|
194
199
|
|
|
200
|
+
# Collect the SQL (custom) rules in scope up front. A scope can contain only SQL
|
|
201
|
+
# rules and no metrics, so both the table guard below and the main "nothing to
|
|
202
|
+
# export" guard consult this to avoid bailing out before the rules are exported.
|
|
203
|
+
# `namespace` scopes the rules the same way it scopes metrics below.
|
|
204
|
+
sql_rule_deployments = mc.collect_sql_rule_deployments(
|
|
205
|
+
collection_id=collection_id, table_id=table_id, namespace=namespace
|
|
206
|
+
)
|
|
207
|
+
|
|
195
208
|
# Add metric ids if passed
|
|
196
209
|
if metric_ids:
|
|
197
210
|
final_metric_ids.extend(metric_ids)
|
|
@@ -209,16 +222,22 @@ def export(
|
|
|
209
222
|
table_ids=[table_id]
|
|
210
223
|
).metrics
|
|
211
224
|
final_metric_ids.extend([m.metric_configuration.id for m in metrics_from_table])
|
|
212
|
-
if not metrics_from_table:
|
|
225
|
+
if not metrics_from_table and not sql_rule_deployments:
|
|
213
226
|
raise typer.BadParameter(
|
|
214
|
-
f"No metrics found for given table id. Please check arguments and try again."
|
|
227
|
+
f"No metrics or SQL rules found for given table id. Please check arguments and try again."
|
|
215
228
|
)
|
|
216
|
-
if not collection_id:
|
|
229
|
+
if metrics_from_table and not collection_id:
|
|
217
230
|
collection.name = metrics_from_table[0].metric_metadata.dataset_name
|
|
218
231
|
|
|
219
|
-
# Pull raw metric info. Converting to protobuf objects complicates default and zero values
|
|
220
|
-
|
|
221
|
-
|
|
232
|
+
# Pull raw metric info. Converting to protobuf objects complicates default and zero values
|
|
233
|
+
# unnecessarily. NOTE: the API treats an empty metric_ids list as "no filter" and returns
|
|
234
|
+
# every metric in the workspace, so only fetch when at least one metric is in scope --
|
|
235
|
+
# otherwise a metrics-less scope (e.g. a collection of only SQL rules) would export everything.
|
|
236
|
+
raw_metrics: List[dict] = (
|
|
237
|
+
client.get_metric_info_batch_post(metric_ids=final_metric_ids, return_raw_response=True)
|
|
238
|
+
if final_metric_ids
|
|
239
|
+
else []
|
|
240
|
+
)
|
|
222
241
|
|
|
223
242
|
# `namespace` is used ONLY to filter which metrics get exported. It is
|
|
224
243
|
# intentionally NOT written into the generated bigconfig file (nor the shared
|
|
@@ -234,40 +253,47 @@ def export(
|
|
|
234
253
|
if not output_path:
|
|
235
254
|
output_path = client.config.bigconfig_output_path or Path.cwd()
|
|
236
255
|
|
|
237
|
-
if not raw_metrics:
|
|
256
|
+
if not raw_metrics and not sql_rule_deployments:
|
|
238
257
|
raise typer.BadParameter(
|
|
239
|
-
"No metrics found for given arguments. Please check again."
|
|
258
|
+
"No metrics or SQL rules found for given arguments. Please check again."
|
|
240
259
|
)
|
|
241
260
|
|
|
261
|
+
if raw_metrics:
|
|
262
|
+
if not use_v1:
|
|
263
|
+
mc.infos_to_convert = raw_metrics
|
|
264
|
+
template_smds = mc.collect_template_smds_from_inputs()
|
|
265
|
+
mc.write_or_update_smd_library(
|
|
266
|
+
template_smds_from_inputs=template_smds, auto_apply=auto_apply_on_indexing
|
|
267
|
+
)
|
|
268
|
+
typer.secho(
|
|
269
|
+
f"\nUpdated SMD library at: {mc.saved_metric_def_path}\n", fg="green", bold=True
|
|
270
|
+
)
|
|
242
271
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
template_smds = mc.collect_template_smds_from_inputs()
|
|
246
|
-
mc.write_or_update_smd_library(
|
|
247
|
-
template_smds_from_inputs=template_smds, auto_apply=auto_apply_on_indexing
|
|
248
|
-
)
|
|
249
|
-
typer.secho(
|
|
250
|
-
f"\nUpdated SMD library at: {mc.saved_metric_def_path}\n", fg="green", bold=True
|
|
251
|
-
)
|
|
252
|
-
|
|
253
|
-
if smd_only:
|
|
254
|
-
raise typer.Exit(0)
|
|
272
|
+
if smd_only:
|
|
273
|
+
raise typer.Exit(0)
|
|
255
274
|
|
|
256
|
-
|
|
275
|
+
bc = mc.to_bigconfig_yaml(collection=collection, auto_apply_on_indexing=auto_apply_on_indexing)
|
|
257
276
|
|
|
258
|
-
|
|
259
|
-
|
|
277
|
+
# Dumping **kwargs messes up the formatting
|
|
278
|
+
bigconfig = BigConfig(type=bc["type"])
|
|
260
279
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
280
|
+
if bc.get("auto_apply_on_indexing", None):
|
|
281
|
+
bigconfig.auto_apply_on_indexing = True
|
|
282
|
+
if bc.get("tag_definitions", None):
|
|
283
|
+
bigconfig.tag_definitions = bc.get("tag_definitions")
|
|
265
284
|
|
|
266
|
-
|
|
285
|
+
bigconfig.tag_deployments = bc.get("tag_deployments")
|
|
286
|
+
else:
|
|
287
|
+
bigconfig = mc.metric_info_to_bigconfig(
|
|
288
|
+
metric_info=MetricInfoList(metrics=[MetricInfo().from_dict(m) for m in raw_metrics]), collection=collection
|
|
289
|
+
)
|
|
267
290
|
else:
|
|
268
|
-
bigconfig
|
|
269
|
-
|
|
270
|
-
|
|
291
|
+
# Only SQL rules are in scope: emit a minimal bigconfig carrying just the rules.
|
|
292
|
+
bigconfig = BigConfig(type='BIGCONFIG_FILE')
|
|
293
|
+
|
|
294
|
+
# Export custom (SQL) rules in scope alongside the metrics, in the same format apply reads.
|
|
295
|
+
if sql_rule_deployments:
|
|
296
|
+
bigconfig.sql_rules = sql_rule_deployments
|
|
271
297
|
|
|
272
298
|
file_name = sanitize_filename(collection.name)
|
|
273
299
|
output = bigconfig.save(
|
|
@@ -31,7 +31,7 @@ no_queue: bool = typer.Option(
|
|
|
31
31
|
False
|
|
32
32
|
, "--no_queue"
|
|
33
33
|
, "-nq"
|
|
34
|
-
, help="Don't submit to queue: True or False. [DEPRECATED]"
|
|
34
|
+
, help="Don't submit to queue: True or False. [DEPRECATED — ignored; will be removed in 1.0]"
|
|
35
35
|
)
|
|
36
36
|
recursive: bool = typer.Option(
|
|
37
37
|
False
|
|
@@ -50,6 +50,7 @@ from bigeye_sdk.generated.com.bigeye.models.generated import (
|
|
|
50
50
|
OwnableType,
|
|
51
51
|
SchemaChange,
|
|
52
52
|
)
|
|
53
|
+
from bigeye_sdk.decorators.deprecation import build_deprecation_message
|
|
53
54
|
from bigeye_sdk.log import get_logger
|
|
54
55
|
from bigeye_cli.functions import (
|
|
55
56
|
write_metric_info,
|
|
@@ -98,6 +99,7 @@ def regen_autometrics(
|
|
|
98
99
|
),
|
|
99
100
|
):
|
|
100
101
|
"""Regenerates Autometrics by warehouse id OR warehouse id and list of schema names OR list of table ids."""
|
|
102
|
+
log.warning(build_deprecation_message("bigeye catalog regen_autometrics"))
|
|
101
103
|
client = cli_client_factory(bigeye_conf, config_file, workspace)
|
|
102
104
|
|
|
103
105
|
if not table_ids:
|
|
@@ -657,6 +659,7 @@ def set_metric_time(
|
|
|
657
659
|
):
|
|
658
660
|
"""Sets metric times from a list of possible metric column names. Can set for whole warehouse or for a list of
|
|
659
661
|
table IDs."""
|
|
662
|
+
log.warning(build_deprecation_message("bigeye catalog set_metric_time", "rct_overrides at the metric level"))
|
|
660
663
|
client = cli_client_factory(bigeye_conf, config_file, workspace)
|
|
661
664
|
|
|
662
665
|
if warehouse_id and table_ids:
|
|
@@ -691,6 +694,7 @@ def unset_metric_time(
|
|
|
691
694
|
),
|
|
692
695
|
):
|
|
693
696
|
"""Unsets metric times for whole warehouse or for a list og table IDs."""
|
|
697
|
+
log.warning(build_deprecation_message("bigeye catalog unset_metric_time", "rct_overrides at the metric level"))
|
|
694
698
|
client = cli_client_factory(bigeye_conf, config_file, workspace)
|
|
695
699
|
|
|
696
700
|
if warehouse_id and table_ids:
|
|
@@ -941,11 +945,11 @@ def upsert_virtual_table(
|
|
|
941
945
|
]
|
|
942
946
|
|
|
943
947
|
if update:
|
|
944
|
-
log.warning(
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
)
|
|
948
|
+
log.warning(build_deprecation_message(
|
|
949
|
+
"The --update flag",
|
|
950
|
+
details="This command now scans for virtual tables matching the given source and virtual table "
|
|
951
|
+
"names; if one is found it is updated, otherwise it is created.",
|
|
952
|
+
))
|
|
949
953
|
|
|
950
954
|
table: Table = next(
|
|
951
955
|
(
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import enum
|
|
2
|
-
from typing import List
|
|
2
|
+
from typing import Any, List
|
|
3
3
|
|
|
4
4
|
from bigeye_cli.model.github_report import GitHubReport
|
|
5
|
+
from bigeye_sdk.decorators.deprecation import warn_deprecated
|
|
5
6
|
from bigeye_sdk.generated.com.bigeye.models.generated import PredefinedMetric, PredefinedMetricName
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
# Deprecated, scheduled for removal in Bigeye 1.0. This constant is unused within the
|
|
9
|
+
# CLI/SDK; it is served via module __getattr__ (PEP 562) so any external access emits a
|
|
10
|
+
# DeprecationWarning while internal code (which never references it) stays silent.
|
|
11
|
+
_OPS_METRICS: List[PredefinedMetric] = [
|
|
8
12
|
PredefinedMetric(metric_name=PredefinedMetricName.PERCENT_NULL),
|
|
9
13
|
PredefinedMetric(metric_name=PredefinedMetricName.COUNT_NULL),
|
|
10
14
|
PredefinedMetric(metric_name=PredefinedMetricName.PERCENT_EMPTY_STRING),
|
|
@@ -18,6 +22,13 @@ OPS_METRICS: List[PredefinedMetric] = [
|
|
|
18
22
|
]
|
|
19
23
|
|
|
20
24
|
|
|
25
|
+
def __getattr__(name: str) -> Any:
|
|
26
|
+
if name == "OPS_METRICS":
|
|
27
|
+
warn_deprecated(subject="OPS_METRICS")
|
|
28
|
+
return _OPS_METRICS
|
|
29
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
30
|
+
|
|
31
|
+
|
|
21
32
|
class MetricFileType(enum.Enum):
|
|
22
33
|
SIMPLE = 'SIMPLE'
|
|
23
34
|
FULL = 'FULL'
|
|
@@ -44,19 +44,13 @@ def create_node(
|
|
|
44
44
|
...
|
|
45
45
|
, "--entity_name"
|
|
46
46
|
, "-en"
|
|
47
|
-
, help="The fully qualified table name
|
|
48
|
-
),
|
|
49
|
-
integration_name: Optional[str] = typer.Option(
|
|
50
|
-
None
|
|
51
|
-
, "--int_name"
|
|
52
|
-
, "-in"
|
|
53
|
-
, help="The name of the BI connection (required for entities outside of Bigeye)"
|
|
47
|
+
, help="The fully qualified table name"
|
|
54
48
|
)
|
|
55
49
|
):
|
|
56
50
|
"""Create a lineage node for an entity"""
|
|
57
51
|
client = cli_client_factory(bigeye_conf, config_file, workspace)
|
|
58
52
|
lineage_controller = LineageController(client)
|
|
59
|
-
node = lineage_controller.create_node_by_name(entity_name=entity_name
|
|
53
|
+
node = lineage_controller.create_node_by_name(entity_name=entity_name)
|
|
60
54
|
log.info(f"Node created:\n\tID: {node.id}\n\tname: {node.node_name}")
|
|
61
55
|
|
|
62
56
|
|
|
@@ -69,19 +63,13 @@ def delete_node(
|
|
|
69
63
|
...
|
|
70
64
|
, "--entity_name"
|
|
71
65
|
, "-en"
|
|
72
|
-
, help="The fully qualified table name
|
|
73
|
-
),
|
|
74
|
-
integration_name: Optional[str] = typer.Option(
|
|
75
|
-
None
|
|
76
|
-
, "--int_name"
|
|
77
|
-
, "-in"
|
|
78
|
-
, help="The name of the BI connection (required for entities outside of Bigeye)"
|
|
66
|
+
, help="The fully qualified table name"
|
|
79
67
|
)
|
|
80
68
|
):
|
|
81
69
|
"""Delete a lineage node for an entity"""
|
|
82
70
|
client = cli_client_factory(bigeye_conf, config_file, workspace)
|
|
83
71
|
lineage_controller = LineageController(client)
|
|
84
|
-
lineage_controller.delete_node_by_name(entity_name=entity_name
|
|
72
|
+
lineage_controller.delete_node_by_name(entity_name=entity_name)
|
|
85
73
|
|
|
86
74
|
|
|
87
75
|
@app.command()
|
|
@@ -139,19 +127,13 @@ def delete_relation(
|
|
|
139
127
|
None
|
|
140
128
|
, "--entity_name"
|
|
141
129
|
, "-en"
|
|
142
|
-
, help="The fully qualified table name
|
|
130
|
+
, help="The fully qualified table name"
|
|
143
131
|
),
|
|
144
132
|
relationship_id: Optional[int] = typer.Option(
|
|
145
133
|
0
|
|
146
134
|
, "--relation_id"
|
|
147
135
|
, "-rid"
|
|
148
136
|
, help="The relationship ID to delete"
|
|
149
|
-
),
|
|
150
|
-
integration_name: Optional[str] = typer.Option(
|
|
151
|
-
None
|
|
152
|
-
, "--int_name"
|
|
153
|
-
, "-in"
|
|
154
|
-
, help="The name of the BI connection (required for entities outside of Bigeye)"
|
|
155
137
|
)
|
|
156
138
|
):
|
|
157
139
|
"""Deletes a single relationship based on relation ID or all relationships for a node by name."""
|
|
@@ -163,7 +145,7 @@ def delete_relation(
|
|
|
163
145
|
elif relationship_id:
|
|
164
146
|
client.delete_lineage_relationship(relationship_id=relationship_id)
|
|
165
147
|
else:
|
|
166
|
-
lineage_controller.delete_relationships_by_name(entity_name=entity_name
|
|
148
|
+
lineage_controller.delete_relationships_by_name(entity_name=entity_name)
|
|
167
149
|
|
|
168
150
|
|
|
169
151
|
@app.command()
|
|
@@ -366,6 +348,12 @@ def export_end_to_end(
|
|
|
366
348
|
"--max-paths",
|
|
367
349
|
help="Per-root cap on enumerated paths. Truncation is logged, never silent.",
|
|
368
350
|
),
|
|
351
|
+
include_etl: bool = typer.Option(
|
|
352
|
+
True,
|
|
353
|
+
"--include-etl/--no-include-etl",
|
|
354
|
+
help="Include or exclude ETL operator nodes as hops. When excluded, paths are stitched "
|
|
355
|
+
"across removed ETL nodes (A -> ETL -> C becomes A -> C). Defaults to including them.",
|
|
356
|
+
),
|
|
369
357
|
depth: Optional[int] = typer.Option(
|
|
370
358
|
None,
|
|
371
359
|
"--depth",
|
|
@@ -411,6 +399,7 @@ def export_end_to_end(
|
|
|
411
399
|
max_paths=max_paths,
|
|
412
400
|
depth=depth,
|
|
413
401
|
concurrency=concurrency,
|
|
402
|
+
include_etl=include_etl,
|
|
414
403
|
)
|
|
415
404
|
|
|
416
405
|
log.info(
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import warnings
|
|
3
2
|
from collections import defaultdict
|
|
4
3
|
from os import listdir
|
|
5
4
|
from os.path import join, isfile
|
|
@@ -29,6 +28,7 @@ from bigeye_sdk.model.protobuf_enum_facade import (
|
|
|
29
28
|
SimpleFieldType,
|
|
30
29
|
)
|
|
31
30
|
|
|
31
|
+
from bigeye_sdk.decorators.deprecation import build_deprecation_message
|
|
32
32
|
from bigeye_sdk.log import get_logger
|
|
33
33
|
from bigeye_cli.functions import (
|
|
34
34
|
write_metric_info,
|
|
@@ -182,11 +182,10 @@ def upsert_from_path(
|
|
|
182
182
|
c_ix: Dict[str, List[int]] = defaultdict(list)
|
|
183
183
|
|
|
184
184
|
if set_row_creation_time:
|
|
185
|
-
|
|
186
|
-
"set_row_creation_time
|
|
187
|
-
"Row creation time is managed in the metricConfiguration
|
|
188
|
-
|
|
189
|
-
)
|
|
185
|
+
log.warning(build_deprecation_message(
|
|
186
|
+
"--set_row_creation_time",
|
|
187
|
+
details="Row creation time is managed in the metricConfiguration via the 'rctOverride' field.",
|
|
188
|
+
))
|
|
190
189
|
named_schedules = {s.name.strip().lower(): s.id for s in client.get_named_schedule().named_schedules}
|
|
191
190
|
|
|
192
191
|
for m in mil.metrics:
|
|
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
|