bigeye-cli 0.3.52__tar.gz → 0.3.54__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.
Files changed (35) hide show
  1. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/PKG-INFO +3 -3
  2. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/CLI_DOCS.md +1 -1
  3. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/catalog/catalog_commands.py +58 -5
  4. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/deltas/deltas_commands.py +2 -2
  5. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/functions.py +1 -0
  6. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/lineage/lineage_commands.py +6 -27
  7. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/pyproject.toml +2 -2
  8. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/LICENSE +0 -0
  9. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/__init__.py +0 -0
  10. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/__main__.py +0 -0
  11. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/__version__.py +0 -0
  12. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/bigconfig/__init__.py +0 -0
  13. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/bigconfig/bigconfig_commands.py +0 -0
  14. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/bigconfig/bigconfig_options.py +0 -0
  15. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/catalog/__init__.py +0 -0
  16. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/collections/__init__.py +0 -0
  17. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/collections/collection_commands.py +0 -0
  18. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/configure/__init__.py +0 -0
  19. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/configure/configure_commands.py +0 -0
  20. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/deltas/__init__.py +0 -0
  21. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/enums.py +0 -0
  22. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/exceptions/__init__.py +0 -0
  23. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/exceptions/exceptions.py +0 -0
  24. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/global_options.py +0 -0
  25. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/issues/__init__.py +0 -0
  26. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/issues/issue_commands.py +0 -0
  27. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/lineage/__init__.py +0 -0
  28. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/metric/__init__.py +0 -0
  29. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/metric/metric_commands.py +0 -0
  30. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/model/__init__.py +0 -0
  31. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/model/cicd_conf.py +0 -0
  32. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/model/github_report.py +0 -0
  33. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/model/vendor_report.py +0 -0
  34. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/bigeye_cli/workspace/__init__.py +0 -0
  35. {bigeye_cli-0.3.52 → bigeye_cli-0.3.54}/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.3.52
3
+ Version: 0.3.54
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
@@ -14,13 +14,13 @@ Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
16
  Requires-Dist: PyGithub (>=1.57,<2.0)
17
- Requires-Dist: bigeye-sdk (>=0.4.72,<0.5.0)
17
+ Requires-Dist: bigeye-sdk (>=0.4.74,<0.5.0)
18
18
  Requires-Dist: click (>=8.0.4,<9.0.0)
19
19
  Requires-Dist: rich (>=12.4.4,<13.0.0)
20
20
  Description-Content-Type: text/markdown
21
21
 
22
22
  # **Bigeye CLI**
23
- Version: 0.3.52
23
+ Version: 0.3.54
24
24
  ## Installation
25
25
 
26
26
  **Setting up your local/build environment**
@@ -1,5 +1,5 @@
1
1
  # **Bigeye CLI**
2
- Version: 0.3.52
2
+ Version: 0.3.54
3
3
  ## Installation
4
4
 
5
5
  **Setting up your local/build environment**
@@ -1,8 +1,7 @@
1
- # create logger
2
1
  import json
3
2
  import logging
4
3
  from pathlib import Path
5
- from typing import Optional, List, Tuple, Dict
4
+ from typing import Optional, List, Dict
6
5
 
7
6
  import typer
8
7
  from rich.progress import track
@@ -12,12 +11,12 @@ from bigeye_sdk.client.enum import Method
12
11
  from bigeye_cli.enums import OPS_METRICS
13
12
  from bigeye_cli import global_options
14
13
  from bigeye_sdk.functions.dbt import parse_dbt_manifest
14
+ from bigeye_sdk.functions.file_functs import read_json_file
15
15
  from bigeye_sdk.functions.search_and_match_functions import fuzzy_match
16
16
  from bigeye_sdk.model.dbt_manifest import DbtManifest
17
17
  from bigeye_sdk.model.protobuf_enum_facade import (
18
18
  MetricStatus,
19
19
  SimpleMetricCategory,
20
- SimpleMetricTemplateParameterType,
21
20
  SimpleMetricTemplateFieldType,
22
21
  )
23
22
  from bigeye_sdk.functions.aws import get_secret
@@ -46,6 +45,7 @@ from bigeye_cli.functions import (
46
45
  from bigeye_sdk.functions.metric_functions import has_auto_threshold
47
46
  from bigeye_sdk.functions.core_py_functs import int_enum_enum_list_joined
48
47
 
48
+ # create logger
49
49
  log = get_logger(__file__)
50
50
 
51
51
  app = typer.Typer(no_args_is_help=True, help="Catalog Commands for Bigeye CLI")
@@ -520,7 +520,7 @@ def backfill_metrics(
520
520
  "--queue",
521
521
  "-q",
522
522
  help="Submit the batch to a queue. (Recommended for larger batches)",
523
- )
523
+ ),
524
524
  ):
525
525
  """Backfills metrics by warehouse id, schema names, and/or table ids."""
526
526
  client = cli_client_factory(bigeye_conf, config_file, workspace)
@@ -571,7 +571,7 @@ def run_metrics(
571
571
  "--queue",
572
572
  "-q",
573
573
  help="Submit the batch to a queue. (Recommended for larger batches)",
574
- )
574
+ ),
575
575
  ):
576
576
  """Runs metrics by warehouse id, schema names, and/or table ids"""
577
577
  client = cli_client_factory(bigeye_conf, config_file, workspace)
@@ -1075,3 +1075,56 @@ def ingest_owners_from_dbt(
1075
1075
  f"No matching Bigeye user found for model: {model_name} - "
1076
1076
  f"owner: {node.config.meta.owner}"
1077
1077
  )
1078
+
1079
+
1080
+ @app.command()
1081
+ def ingest_dbt_core_run_info(
1082
+ bigeye_conf: str = global_options.bigeye_conf,
1083
+ config_file: str = global_options.config_file,
1084
+ workspace: str = global_options.workspace,
1085
+ target_path: Optional[str] = typer.Option(
1086
+ "./target",
1087
+ "--target_path",
1088
+ "-tp",
1089
+ help="The path to the target directory created with dbt run, build, and test commands.",
1090
+ ),
1091
+ project_name: Optional[str] = typer.Option(
1092
+ None, "--project_name", "-pn", help="The name of the dbt project. Will attempt to parse from metadata section of manifest.json, if not present"
1093
+ ),
1094
+ job_name: Optional[str] = typer.Option(
1095
+ None, "--job_name", "-jn", help="The name of the dbt job."
1096
+ ),
1097
+ job_run_id: Optional[str] = typer.Option(
1098
+ None, "--job_run_id", "-jid", help="The ID of the dbt job run."
1099
+ ),
1100
+ project_url: Optional[str] = typer.Option(
1101
+ None, "--project_url", "-purl", help="The URL of the project."
1102
+ ),
1103
+ job_url: Optional[str] = typer.Option(
1104
+ None, "--job_url", "-jurl", help="The URL of the job."
1105
+ ),
1106
+ job_run_url: Optional[str] = typer.Option(
1107
+ None, "--job_run_url", "-jrurl", help="The URL of the job run."
1108
+ ),
1109
+ ):
1110
+ """Ingest manifest.json and run_results.json from different dbt commands."""
1111
+
1112
+ manifest_json = read_json_file(file_path=f"{target_path}/manifest.json")
1113
+ run_results_json = read_json_file(file_path=f"{target_path}/run_results.json")
1114
+
1115
+ client = cli_client_factory(bigeye_conf, config_file, workspace)
1116
+
1117
+ response = client.send_dbt_core_job_info(
1118
+ project_name=project_name,
1119
+ job_name=job_name,
1120
+ job_run_id=job_run_id,
1121
+ manifest_json=json.dumps(manifest_json),
1122
+ run_results_json=json.dumps(run_results_json),
1123
+ project_url=project_url,
1124
+ job_url=job_url,
1125
+ job_run_url=job_run_url
1126
+ )
1127
+
1128
+ log.info(
1129
+ f"The following response was returned:\n\n\t{response.to_json(indent=True)}"
1130
+ )
@@ -96,7 +96,7 @@ def suggest_deltas(
96
96
  target_selector[1]
97
97
  )
98
98
  matching_target_tables = (
99
- lineage_controller.infer_relationships_from_lists_of_tables(
99
+ lineage_controller.infer_relationships_from_lists(
100
100
  target_1_tables, target_2_tables
101
101
  )
102
102
  )
@@ -104,7 +104,7 @@ def suggest_deltas(
104
104
  mtt[0].name: mtt[1] for mtt in matching_target_tables
105
105
  }
106
106
 
107
- matching_tables = lineage_controller.infer_relationships_from_lists_of_tables(
107
+ matching_tables = lineage_controller.infer_relationships_from_lists(
108
108
  upstream=upstream_tables, downstream=target_1_tables, match_type=match_type
109
109
  )
110
110
 
@@ -1,4 +1,5 @@
1
1
  import enum
2
+ import json
2
3
  import os
3
4
  from typing import List, Dict
4
5
  import typer
@@ -1,7 +1,6 @@
1
1
  from typing import Optional
2
2
 
3
3
  import typer
4
- from rich.progress import track
5
4
 
6
5
 
7
6
  from bigeye_cli.exceptions.exceptions import InvalidEntityException
@@ -160,35 +159,15 @@ def infer_relations(
160
159
  , case_sensitive=False
161
160
  )
162
161
  ):
163
- """Given an upstream and downstream path, infers lineage based on table names and creates the relationships."""
162
+ """Given an upstream and downstream path, infers lineage based on table/column names and creates the edges."""
164
163
  client = cli_client_factory(bigeye_conf, config_file, workspace)
165
164
  lineage_controller = LineageController(client)
166
165
 
167
- upstream_tables = lineage_controller.get_tables_from_selector(
168
- selector=upstream_selector
169
- )
170
- downstream_tables = lineage_controller.get_tables_from_selector(
171
- selector=downstream_selector
172
- )
173
-
174
- matching_tables = lineage_controller.infer_relationships_from_lists_of_tables(upstream=upstream_tables,
175
- downstream=downstream_tables,
176
- match_type=match_type)
166
+ # Get matching tables
167
+ matching_tables = lineage_controller.get_matching_tables_from_selectors(upstream_selector=upstream_selector,
168
+ downstream_selector=downstream_selector,
169
+ match_type=match_type)
177
170
 
178
171
  log.info(f'Identified {len(matching_tables)} table relationships between upstream and downstream sources.')
179
172
 
180
- count_successful_relations = 0
181
- for match in track(matching_tables, description="Creating relationships..."):
182
- upstream = match[0]
183
- downstream = match[1]
184
- try:
185
- lineage_controller.create_relation_from_tables(upstream=upstream, downstream=downstream)
186
- count_successful_relations += 1
187
- except Exception as e:
188
- log.warning(f'Failed to create relationship between upstream table: {upstream.name} and downstream table: '
189
- f'{downstream.name}. Exception: {e}')
190
-
191
- log.info(
192
- f"Successfully created {count_successful_relations} of {len(matching_tables)}"
193
- f" table relationships."
194
- )
173
+ lineage_controller.infer_column_level_lineage_from_tables(matching_tables)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "bigeye-cli"
3
- version = "0.3.52"
3
+ version = "0.3.54"
4
4
  description = "Bigeye CLI offers developer tools for maintaining your developer workspace."
5
5
  license = "Proprietary"
6
6
  authors = ["Bigeye <support@bigeye.com>"]
@@ -19,7 +19,7 @@ bigeye = "bigeye_cli.__main__:app"
19
19
  [tool.poetry.dependencies]
20
20
  python = "^3.9.0"
21
21
  click = "^8.0.4"
22
- bigeye-sdk = "^0.4.72"
22
+ bigeye-sdk = "^0.4.74"
23
23
  rich = "^12.4.4"
24
24
  PyGithub = '^1.57'
25
25
 
File without changes