bigeye-cli 0.3.60__tar.gz → 0.3.61__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 (37) hide show
  1. bigeye_cli-0.3.60/bigeye_cli/CLI_DOCS.md → bigeye_cli-0.3.61/PKG-INFO +81 -12
  2. bigeye_cli-0.3.60/PKG-INFO → bigeye_cli-0.3.61/bigeye_cli/CLI_DOCS.md +59 -33
  3. bigeye_cli-0.3.61/bigeye_cli/bigconfig/bigconfig_commands.py +198 -0
  4. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/catalog/catalog_commands.py +229 -10
  5. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/deltas/deltas_commands.py +56 -32
  6. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/exceptions/exceptions.py +10 -0
  7. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/metric/metric_commands.py +3 -3
  8. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/model/github_report.py +27 -15
  9. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/model/vendor_report.py +4 -0
  10. bigeye_cli-0.3.61/bigeye_cli/workspace/workspace_commands.py +575 -0
  11. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/pyproject.toml +3 -3
  12. bigeye_cli-0.3.60/bigeye_cli/bigconfig/bigconfig_commands.py +0 -161
  13. bigeye_cli-0.3.60/bigeye_cli/workspace/workspace_commands.py +0 -490
  14. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/LICENSE +0 -0
  15. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/__init__.py +0 -0
  16. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/__main__.py +0 -0
  17. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/__version__.py +0 -0
  18. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/bigconfig/__init__.py +0 -0
  19. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/bigconfig/bigconfig_options.py +0 -0
  20. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/catalog/__init__.py +0 -0
  21. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/collections/__init__.py +0 -0
  22. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/collections/collection_commands.py +0 -0
  23. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/configure/__init__.py +0 -0
  24. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/configure/configure_commands.py +0 -0
  25. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/deltas/__init__.py +0 -0
  26. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/enums.py +0 -0
  27. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/exceptions/__init__.py +0 -0
  28. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/functions.py +0 -0
  29. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/global_options.py +0 -0
  30. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/issues/__init__.py +0 -0
  31. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/issues/issue_commands.py +0 -0
  32. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/lineage/__init__.py +0 -0
  33. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/lineage/lineage_commands.py +0 -0
  34. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/metric/__init__.py +0 -0
  35. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/model/__init__.py +0 -0
  36. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/model/cicd_conf.py +0 -0
  37. {bigeye_cli-0.3.60 → bigeye_cli-0.3.61}/bigeye_cli/workspace/__init__.py +0 -0
@@ -1,5 +1,26 @@
1
+ Metadata-Version: 2.1
2
+ Name: bigeye-cli
3
+ Version: 0.3.61
4
+ Summary: Bigeye CLI offers developer tools for maintaining your developer workspace.
5
+ Home-page: https://docs.bigeye.com/docs
6
+ License: Proprietary
7
+ Author: Bigeye
8
+ Author-email: support@bigeye.com
9
+ Requires-Python: >=3.9.0,<4.0.0
10
+ Classifier: License :: Other/Proprietary License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Requires-Dist: PyGithub (>=1.57,<2.0)
17
+ Requires-Dist: bigeye-sdk (>=0.4.81,<0.5.0)
18
+ Requires-Dist: click (>=8.0.4,<9.0.0)
19
+ Requires-Dist: rich (>=12.4.4,<13.0.0)
20
+ Description-Content-Type: text/markdown
21
+
1
22
  # **Bigeye CLI**
2
- Version: 0.3.55
23
+ Version: 0.3.61
3
24
  ## Installation
4
25
 
5
26
  **Setting up your local/build environment**
@@ -171,9 +192,7 @@ password = fakepassword1234
171
192
 
172
193
  **Note:** Most use cases will only require you to have a single `DEFAULT` credential that all workspaces can utilize. Running the `bigeye configure -w <workspace-name>` command for a non-default workspace will prompt you to inherit the credentials from default or create a new set of credentials. A workspace credential is only required if the `use_default_credential` setting is set to False in the configuration of the corresponding workspace.
173
194
 
174
- # CLI Documentation
175
-
176
- # `bigeye configure`
195
+ # CLI Documentation# `bigeye configure`
177
196
 
178
197
  Configuration Commands for Bigeye CLI
179
198
 
@@ -287,6 +306,7 @@ $ bigeye workspace [OPTIONS] COMMAND [ARGS]...
287
306
  * `schedule-all-metrics`: Schedule all metrics in a workspace.
288
307
  * `unschedule-all-metrics`: Unschedule all metrics in a workspace.
289
308
  * `upsert-group`: Create or update a group.
309
+ * `upsert-named-schedule`: Create a named, cron based schedule
290
310
  * `upsert-workspace`: Create or update a workspace.
291
311
 
292
312
  ## `bigeye workspace create-named-schedule`
@@ -513,6 +533,25 @@ $ bigeye workspace upsert-group [OPTIONS]
513
533
  * `-id, --group_id INTEGER`: Group ID.
514
534
  * `--help`: Show this message and exit.
515
535
 
536
+ ## `bigeye workspace upsert-named-schedule`
537
+
538
+ Create a named, cron based schedule
539
+
540
+ **Usage**:
541
+
542
+ ```console
543
+ $ bigeye workspace upsert-named-schedule [OPTIONS]
544
+ ```
545
+
546
+ **Options**:
547
+
548
+ * `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
549
+ * `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
550
+ * `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
551
+ * `-sn, --name TEXT`: The user defined name of the schedule [required]
552
+ * `-c, --cron TEXT`: The cron string to define the schedule [required]
553
+ * `--help`: Show this message and exit.
554
+
516
555
  ## `bigeye workspace upsert-workspace`
517
556
 
518
557
  Create or update a workspace.
@@ -624,6 +663,7 @@ $ bigeye bigconfig plan [OPTIONS]
624
663
  * `-nq, --no_queue`: Don't submit to queue: True or False.
625
664
  * `-r, --recursive`: Search all input directories recursively.
626
665
  * `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
666
+ * `-cicd, --cicd_report`: Add the report to a pull request. (Github only)
627
667
  * `--help`: Show this message and exit.
628
668
 
629
669
  # `bigeye catalog`
@@ -663,6 +703,7 @@ $ bigeye catalog [OPTIONS] COMMAND [ARGS]...
663
703
  * `run-metrics`: Runs metrics by warehouse id, schema...
664
704
  * `schedule-all-metrics`: Updates schedule for all metrics in a...
665
705
  * `set-metric-time`: Sets metric times from a list of possible...
706
+ * `track-schema-changes`: Track schema changes for sources on demand...
666
707
  * `unschedule-all-metrics`: Unschedule all metrics by warehouse,...
667
708
  * `unset-metric-time`: Unsets metric times for whole warehouse or...
668
709
  * `upsert-template`: Create or update a template for a source.
@@ -750,7 +791,7 @@ $ bigeye catalog delete-metrics [OPTIONS]
750
791
  * `-wid, --warehouse_id INTEGER`: Warehouse ID
751
792
  * `-sn, --schema_name TEXT`: List of Schema Names. E.g. -sn schema_1 -sn schema_2.
752
793
  * `-tid, --table_id INTEGER`: Table IDs. E.g. -tid 123 -tid 124
753
- * `-m, --metric_type TEXT`: Delete by name of the metric type.UNDEFINED_PREDEFINED_METRIC_NAME, PERCENT_NULL, COUNT_NULL, PERCENT_EMPTY_STRING, COUNT_EMPTY_STRING, PERCENT_UNIQUE, PERCENT_VALUE_IN_LIST, AVERAGE, MIN, MAX, SUM, COUNT_ROWS, COUNT_DISTINCT, HOURS_SINCE_MAX_DATE, HOURS_SINCE_MAX_TIMESTAMP, COUNT_TRUE, PERCENT_TRUE, COUNT_FALSE, PERCENT_FALSE, COUNT_USA_PHONE, PERCENT_USA_PHONE, COUNT_USA_ZIP_CODE, PERCENT_USA_ZIP_CODE, PERCENT_UUID, COUNT_TIMESTAMP_STRING, PERCENT_TIMESTAMP_STRING, COUNT_DUPLICATES, COUNT_USA_STATE_CODE, PERCENT_USA_STATE_CODE, VARIANCE, SKEW, KURTOSIS, GEOMETRIC_MEAN, HARMONIC_MEAN, COUNT_UUID, COUNT_CUSIP, PERCENT_CUSIP, COUNT_SEDOL, PERCENT_SEDOL, COUNT_ISIN, PERCENT_ISIN, COUNT_LEI, PERCENT_LEI, COUNT_FIGI, PERCENT_FIGI, COUNT_PERM_ID, PERCENT_PERM_ID, COUNT_NAN, PERCENT_NAN, COUNT_LONGITUDE, PERCENT_LONGITUDE, COUNT_LATITUDE, PERCENT_LATITUDE, COUNT_NOT_IN_FUTURE, PERCENT_NOT_IN_FUTURE, COUNT_DATE_NOT_IN_FUTURE, PERCENT_DATE_NOT_IN_FUTURE, MEDIAN, PERCENTILE, COUNT_NOT_NULL, STRING_LENGTH_AVERAGE, STRING_LENGTH_MIN, STRING_LENGTH_MAX, COUNT_SSN, PERCENT_SSN, COUNT_EMAIL, PERCENT_EMAIL, ROWS_INSERTED, HOURS_SINCE_LAST_LOAD, COUNT_READ_QUERIES, PERCENT_NOT_NULL, FRESHNESS, VOLUME, FRESHNESS_DATA, VOLUME_DATA
794
+ * `-m, --metric_type TEXT`: Delete by name of the metric type.UNDEFINED_PREDEFINED_METRIC_NAME, PERCENT_NULL, COUNT_NULL, PERCENT_EMPTY_STRING, COUNT_EMPTY_STRING, PERCENT_UNIQUE, PERCENT_VALUE_IN_LIST, AVERAGE, MIN, MAX, SUM, COUNT_ROWS, COUNT_DISTINCT, HOURS_SINCE_MAX_DATE, HOURS_SINCE_MAX_TIMESTAMP, COUNT_TRUE, PERCENT_TRUE, COUNT_FALSE, PERCENT_FALSE, COUNT_USA_PHONE, PERCENT_USA_PHONE, COUNT_USA_ZIP_CODE, PERCENT_USA_ZIP_CODE, PERCENT_UUID, COUNT_TIMESTAMP_STRING, PERCENT_TIMESTAMP_STRING, COUNT_DUPLICATES, COUNT_USA_STATE_CODE, PERCENT_USA_STATE_CODE, VARIANCE, SKEW, KURTOSIS, GEOMETRIC_MEAN, HARMONIC_MEAN, COUNT_UUID, COUNT_CUSIP, PERCENT_CUSIP, COUNT_SEDOL, PERCENT_SEDOL, COUNT_ISIN, PERCENT_ISIN, COUNT_LEI, PERCENT_LEI, COUNT_FIGI, PERCENT_FIGI, COUNT_PERM_ID, PERCENT_PERM_ID, COUNT_NAN, PERCENT_NAN, COUNT_LONGITUDE, PERCENT_LONGITUDE, COUNT_LATITUDE, PERCENT_LATITUDE, COUNT_NOT_IN_FUTURE, PERCENT_NOT_IN_FUTURE, COUNT_DATE_NOT_IN_FUTURE, PERCENT_DATE_NOT_IN_FUTURE, MEDIAN, PERCENTILE, COUNT_NOT_NULL, STRING_LENGTH_AVERAGE, STRING_LENGTH_MIN, STRING_LENGTH_MAX, COUNT_SSN, PERCENT_SSN, COUNT_EMAIL, PERCENT_EMAIL, ROWS_INSERTED, HOURS_SINCE_LAST_LOAD, COUNT_READ_QUERIES, PERCENT_NOT_NULL, FRESHNESS, VOLUME, FRESHNESS_DATA, VOLUME_DATA, COUNT_VALUE_IN_LIST
754
795
  * `--help`: Show this message and exit.
755
796
 
756
797
  ## `bigeye catalog delete-source`
@@ -1073,6 +1114,32 @@ $ bigeye catalog set-metric-time [OPTIONS]
1073
1114
  * `-r, --replace`: replace metric times if already present on tables? Default is false.
1074
1115
  * `--help`: Show this message and exit.
1075
1116
 
1117
+ ## `bigeye catalog track-schema-changes`
1118
+
1119
+ Track schema changes for sources on demand or every n hour(s) and notify specified channels.
1120
+ Environment variables SMTP_USER and SMTP_PASSWORD MUST be set if using email notification.
1121
+
1122
+ **Usage**:
1123
+
1124
+ ```console
1125
+ $ bigeye catalog track-schema-changes [OPTIONS]
1126
+ ```
1127
+
1128
+ **Options**:
1129
+
1130
+ * `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
1131
+ * `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
1132
+ * `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
1133
+ * `-src, --source TEXT`: A list of source names to track. (None will track changes from all sources)
1134
+ * `-s, --since TEXT`: Track schema changes from this date. (Formatted as yyyy-MM-dd) [default: 1970-01-01]
1135
+ * `-f, --frequency INTEGER`: Every n hours to check for schema changes. (None will only run the check once) [default: 0]
1136
+ * `-ct, --change_type [CREATED|DELETED|TYPE_CHANGED]`: The types of changes to track; i.e additions, changes, deletions. (None will track all types) [default: DELETED, CREATED, TYPE_CHANGED]
1137
+ * `-nc, --channel TEXT`: A list of notification channels; e.g. -nc email@mydomain.com -nc #slack_channel -nc https://www.webhook.com
1138
+ * `-smtp, --server TEXT`: The server to send emails.
1139
+ * `-p, --port INTEGER`: The server port to send emails. [default: 587]
1140
+ * `-t, --token TEXT`: The token to utilize the Slack web client. (Will attempt to use environment variable SLACK_BOT_TOKEN, if not set)
1141
+ * `--help`: Show this message and exit.
1142
+
1076
1143
  ## `bigeye catalog unschedule-all-metrics`
1077
1144
 
1078
1145
  Unschedule all metrics by warehouse, schema or tables.
@@ -1127,12 +1194,13 @@ $ bigeye catalog upsert-template [OPTIONS]
1127
1194
  * `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
1128
1195
  * `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
1129
1196
  * `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
1130
- * `-sn, --source_name TEXT`: The name of the source where the template will be defined [required]
1131
- * `-tn, --name TEXT`: The user defined name of the template [required]
1132
- * `-tb, --body TEXT`: The string to define the template [required]
1133
- * `-rt, --returns [BOOLEAN|NUMERIC]`: The data type returned by the template; i.e. NUMERIC, BOOLEAN [required]
1134
- * `-p, --params TEXT`: A list of key/value pairs for parameters; ex. -p column=COLUMN_REFERENCE -p table=STRING [required]
1197
+ * `-sn, --source_name TEXT`: The name of the source where the template will be defined
1198
+ * `-tn, --name TEXT`: The user defined name of the template
1199
+ * `-tb, --body TEXT`: The string to define the template
1200
+ * `-rt, --returns [BOOLEAN|NUMERIC]`: The data type returned by the template; i.e. NUMERIC, BOOLEAN
1201
+ * `-p, --params TEXT`: A list of key/value pairs for parameters; ex. -p column=COLUMN_REFERENCE -p table=STRING
1135
1202
  * `-id, --template_id INTEGER`: The template ID (Only required when updating a template). [default: 0]
1203
+ * `-tf, --template_file TEXT`: A file containing a template definition.
1136
1204
  * `--help`: Show this message and exit.
1137
1205
 
1138
1206
  ## `bigeye catalog upsert-virtual-table`
@@ -1490,7 +1558,7 @@ $ bigeye deltas suggest-deltas [OPTIONS]
1490
1558
  * `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
1491
1559
  * `-source, --source_selector TEXT`: The pattern of tables in the source to select. Wildcard (*) indicates all tables or all schemas, e.g. source_1.*.* would be all schemas in source_1. [required]
1492
1560
  * `-target, --target_selector TEXT`: The pattern of tables in the target to select. Wildcard (*) indicates all tables or all schemas, e.g. source_2.*.* would be all schemas in source_2. [required]
1493
- * `-mt, --match_type [strict|fuzzy]`: How to match tables between the source and target destinations. Strict will only create relations if table names match exactly, Fuzzy will attempt to create relations using a fuzzy match. [default: MatchType.STRICT]
1561
+ * `-mt, --match_type [strict|fuzzy]`: How to match tables between the source and target destinations. Strict will only create relations if table names match exactly, Fuzzy will attempt to create relations using a fuzzy match. [default: strict]
1494
1562
  * `-op, --output_path TEXT`: File to write the delta configuration. [required]
1495
1563
  * `--help`: Show this message and exit.
1496
1564
 
@@ -1757,6 +1825,7 @@ $ bigeye lineage infer-relations [OPTIONS]
1757
1825
  * `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
1758
1826
  * `-upstream, --upstream_selector TEXT`: The pattern of tables in the upstream source to select. Wildcard (*) indicates all tables or all schemas, e.g. source_1.*.* would be all schemas in source_1.
1759
1827
  * `-downstream, --downstream_selector TEXT`: The pattern of tables in the downstream source to select. Wildcard (*) indicates all tables or all schemas, e.g. source_2.*.* would be all schemas in source_2.
1760
- * `-mt, --match_type [strict|fuzzy]`: How to match tables between the source and target destinations. Strict will only create relations if table names match exactly, Fuzzy will attempt to create relations using a fuzzy match. [default: MatchType.STRICT]
1828
+ * `-mt, --match_type [strict|fuzzy]`: How to match tables between the source and target destinations. Strict will only create relations if table names match exactly, Fuzzy will attempt to create relations using a fuzzy match. [default: strict]
1761
1829
  * `--help`: Show this message and exit.
1762
1830
 
1831
+
@@ -1,25 +1,5 @@
1
- Metadata-Version: 2.1
2
- Name: bigeye-cli
3
- Version: 0.3.60
4
- Summary: Bigeye CLI offers developer tools for maintaining your developer workspace.
5
- Home-page: https://docs.bigeye.com/docs
6
- License: Proprietary
7
- Author: Bigeye
8
- Author-email: support@bigeye.com
9
- Requires-Python: >=3.9.0,<4.0.0
10
- Classifier: License :: Other/Proprietary License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.9
13
- Classifier: Programming Language :: Python :: 3.10
14
- Classifier: Programming Language :: Python :: 3.11
15
- Requires-Dist: PyGithub (>=1.57,<2.0)
16
- Requires-Dist: bigeye-sdk (>=0.4.80,<0.5.0)
17
- Requires-Dist: click (>=8.0.4,<9.0.0)
18
- Requires-Dist: rich (>=12.4.4,<13.0.0)
19
- Description-Content-Type: text/markdown
20
-
21
1
  # **Bigeye CLI**
22
- Version: 0.3.55
2
+ Version: 0.3.61
23
3
  ## Installation
24
4
 
25
5
  **Setting up your local/build environment**
@@ -191,9 +171,7 @@ password = fakepassword1234
191
171
 
192
172
  **Note:** Most use cases will only require you to have a single `DEFAULT` credential that all workspaces can utilize. Running the `bigeye configure -w <workspace-name>` command for a non-default workspace will prompt you to inherit the credentials from default or create a new set of credentials. A workspace credential is only required if the `use_default_credential` setting is set to False in the configuration of the corresponding workspace.
193
173
 
194
- # CLI Documentation
195
-
196
- # `bigeye configure`
174
+ # CLI Documentation# `bigeye configure`
197
175
 
198
176
  Configuration Commands for Bigeye CLI
199
177
 
@@ -307,6 +285,7 @@ $ bigeye workspace [OPTIONS] COMMAND [ARGS]...
307
285
  * `schedule-all-metrics`: Schedule all metrics in a workspace.
308
286
  * `unschedule-all-metrics`: Unschedule all metrics in a workspace.
309
287
  * `upsert-group`: Create or update a group.
288
+ * `upsert-named-schedule`: Create a named, cron based schedule
310
289
  * `upsert-workspace`: Create or update a workspace.
311
290
 
312
291
  ## `bigeye workspace create-named-schedule`
@@ -533,6 +512,25 @@ $ bigeye workspace upsert-group [OPTIONS]
533
512
  * `-id, --group_id INTEGER`: Group ID.
534
513
  * `--help`: Show this message and exit.
535
514
 
515
+ ## `bigeye workspace upsert-named-schedule`
516
+
517
+ Create a named, cron based schedule
518
+
519
+ **Usage**:
520
+
521
+ ```console
522
+ $ bigeye workspace upsert-named-schedule [OPTIONS]
523
+ ```
524
+
525
+ **Options**:
526
+
527
+ * `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
528
+ * `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
529
+ * `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
530
+ * `-sn, --name TEXT`: The user defined name of the schedule [required]
531
+ * `-c, --cron TEXT`: The cron string to define the schedule [required]
532
+ * `--help`: Show this message and exit.
533
+
536
534
  ## `bigeye workspace upsert-workspace`
537
535
 
538
536
  Create or update a workspace.
@@ -644,6 +642,7 @@ $ bigeye bigconfig plan [OPTIONS]
644
642
  * `-nq, --no_queue`: Don't submit to queue: True or False.
645
643
  * `-r, --recursive`: Search all input directories recursively.
646
644
  * `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
645
+ * `-cicd, --cicd_report`: Add the report to a pull request. (Github only)
647
646
  * `--help`: Show this message and exit.
648
647
 
649
648
  # `bigeye catalog`
@@ -683,6 +682,7 @@ $ bigeye catalog [OPTIONS] COMMAND [ARGS]...
683
682
  * `run-metrics`: Runs metrics by warehouse id, schema...
684
683
  * `schedule-all-metrics`: Updates schedule for all metrics in a...
685
684
  * `set-metric-time`: Sets metric times from a list of possible...
685
+ * `track-schema-changes`: Track schema changes for sources on demand...
686
686
  * `unschedule-all-metrics`: Unschedule all metrics by warehouse,...
687
687
  * `unset-metric-time`: Unsets metric times for whole warehouse or...
688
688
  * `upsert-template`: Create or update a template for a source.
@@ -770,7 +770,7 @@ $ bigeye catalog delete-metrics [OPTIONS]
770
770
  * `-wid, --warehouse_id INTEGER`: Warehouse ID
771
771
  * `-sn, --schema_name TEXT`: List of Schema Names. E.g. -sn schema_1 -sn schema_2.
772
772
  * `-tid, --table_id INTEGER`: Table IDs. E.g. -tid 123 -tid 124
773
- * `-m, --metric_type TEXT`: Delete by name of the metric type.UNDEFINED_PREDEFINED_METRIC_NAME, PERCENT_NULL, COUNT_NULL, PERCENT_EMPTY_STRING, COUNT_EMPTY_STRING, PERCENT_UNIQUE, PERCENT_VALUE_IN_LIST, AVERAGE, MIN, MAX, SUM, COUNT_ROWS, COUNT_DISTINCT, HOURS_SINCE_MAX_DATE, HOURS_SINCE_MAX_TIMESTAMP, COUNT_TRUE, PERCENT_TRUE, COUNT_FALSE, PERCENT_FALSE, COUNT_USA_PHONE, PERCENT_USA_PHONE, COUNT_USA_ZIP_CODE, PERCENT_USA_ZIP_CODE, PERCENT_UUID, COUNT_TIMESTAMP_STRING, PERCENT_TIMESTAMP_STRING, COUNT_DUPLICATES, COUNT_USA_STATE_CODE, PERCENT_USA_STATE_CODE, VARIANCE, SKEW, KURTOSIS, GEOMETRIC_MEAN, HARMONIC_MEAN, COUNT_UUID, COUNT_CUSIP, PERCENT_CUSIP, COUNT_SEDOL, PERCENT_SEDOL, COUNT_ISIN, PERCENT_ISIN, COUNT_LEI, PERCENT_LEI, COUNT_FIGI, PERCENT_FIGI, COUNT_PERM_ID, PERCENT_PERM_ID, COUNT_NAN, PERCENT_NAN, COUNT_LONGITUDE, PERCENT_LONGITUDE, COUNT_LATITUDE, PERCENT_LATITUDE, COUNT_NOT_IN_FUTURE, PERCENT_NOT_IN_FUTURE, COUNT_DATE_NOT_IN_FUTURE, PERCENT_DATE_NOT_IN_FUTURE, MEDIAN, PERCENTILE, COUNT_NOT_NULL, STRING_LENGTH_AVERAGE, STRING_LENGTH_MIN, STRING_LENGTH_MAX, COUNT_SSN, PERCENT_SSN, COUNT_EMAIL, PERCENT_EMAIL, ROWS_INSERTED, HOURS_SINCE_LAST_LOAD, COUNT_READ_QUERIES, PERCENT_NOT_NULL, FRESHNESS, VOLUME, FRESHNESS_DATA, VOLUME_DATA
773
+ * `-m, --metric_type TEXT`: Delete by name of the metric type.UNDEFINED_PREDEFINED_METRIC_NAME, PERCENT_NULL, COUNT_NULL, PERCENT_EMPTY_STRING, COUNT_EMPTY_STRING, PERCENT_UNIQUE, PERCENT_VALUE_IN_LIST, AVERAGE, MIN, MAX, SUM, COUNT_ROWS, COUNT_DISTINCT, HOURS_SINCE_MAX_DATE, HOURS_SINCE_MAX_TIMESTAMP, COUNT_TRUE, PERCENT_TRUE, COUNT_FALSE, PERCENT_FALSE, COUNT_USA_PHONE, PERCENT_USA_PHONE, COUNT_USA_ZIP_CODE, PERCENT_USA_ZIP_CODE, PERCENT_UUID, COUNT_TIMESTAMP_STRING, PERCENT_TIMESTAMP_STRING, COUNT_DUPLICATES, COUNT_USA_STATE_CODE, PERCENT_USA_STATE_CODE, VARIANCE, SKEW, KURTOSIS, GEOMETRIC_MEAN, HARMONIC_MEAN, COUNT_UUID, COUNT_CUSIP, PERCENT_CUSIP, COUNT_SEDOL, PERCENT_SEDOL, COUNT_ISIN, PERCENT_ISIN, COUNT_LEI, PERCENT_LEI, COUNT_FIGI, PERCENT_FIGI, COUNT_PERM_ID, PERCENT_PERM_ID, COUNT_NAN, PERCENT_NAN, COUNT_LONGITUDE, PERCENT_LONGITUDE, COUNT_LATITUDE, PERCENT_LATITUDE, COUNT_NOT_IN_FUTURE, PERCENT_NOT_IN_FUTURE, COUNT_DATE_NOT_IN_FUTURE, PERCENT_DATE_NOT_IN_FUTURE, MEDIAN, PERCENTILE, COUNT_NOT_NULL, STRING_LENGTH_AVERAGE, STRING_LENGTH_MIN, STRING_LENGTH_MAX, COUNT_SSN, PERCENT_SSN, COUNT_EMAIL, PERCENT_EMAIL, ROWS_INSERTED, HOURS_SINCE_LAST_LOAD, COUNT_READ_QUERIES, PERCENT_NOT_NULL, FRESHNESS, VOLUME, FRESHNESS_DATA, VOLUME_DATA, COUNT_VALUE_IN_LIST
774
774
  * `--help`: Show this message and exit.
775
775
 
776
776
  ## `bigeye catalog delete-source`
@@ -1093,6 +1093,32 @@ $ bigeye catalog set-metric-time [OPTIONS]
1093
1093
  * `-r, --replace`: replace metric times if already present on tables? Default is false.
1094
1094
  * `--help`: Show this message and exit.
1095
1095
 
1096
+ ## `bigeye catalog track-schema-changes`
1097
+
1098
+ Track schema changes for sources on demand or every n hour(s) and notify specified channels.
1099
+ Environment variables SMTP_USER and SMTP_PASSWORD MUST be set if using email notification.
1100
+
1101
+ **Usage**:
1102
+
1103
+ ```console
1104
+ $ bigeye catalog track-schema-changes [OPTIONS]
1105
+ ```
1106
+
1107
+ **Options**:
1108
+
1109
+ * `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
1110
+ * `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
1111
+ * `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
1112
+ * `-src, --source TEXT`: A list of source names to track. (None will track changes from all sources)
1113
+ * `-s, --since TEXT`: Track schema changes from this date. (Formatted as yyyy-MM-dd) [default: 1970-01-01]
1114
+ * `-f, --frequency INTEGER`: Every n hours to check for schema changes. (None will only run the check once) [default: 0]
1115
+ * `-ct, --change_type [CREATED|DELETED|TYPE_CHANGED]`: The types of changes to track; i.e additions, changes, deletions. (None will track all types) [default: DELETED, CREATED, TYPE_CHANGED]
1116
+ * `-nc, --channel TEXT`: A list of notification channels; e.g. -nc email@mydomain.com -nc #slack_channel -nc https://www.webhook.com
1117
+ * `-smtp, --server TEXT`: The server to send emails.
1118
+ * `-p, --port INTEGER`: The server port to send emails. [default: 587]
1119
+ * `-t, --token TEXT`: The token to utilize the Slack web client. (Will attempt to use environment variable SLACK_BOT_TOKEN, if not set)
1120
+ * `--help`: Show this message and exit.
1121
+
1096
1122
  ## `bigeye catalog unschedule-all-metrics`
1097
1123
 
1098
1124
  Unschedule all metrics by warehouse, schema or tables.
@@ -1147,12 +1173,13 @@ $ bigeye catalog upsert-template [OPTIONS]
1147
1173
  * `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
1148
1174
  * `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
1149
1175
  * `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
1150
- * `-sn, --source_name TEXT`: The name of the source where the template will be defined [required]
1151
- * `-tn, --name TEXT`: The user defined name of the template [required]
1152
- * `-tb, --body TEXT`: The string to define the template [required]
1153
- * `-rt, --returns [BOOLEAN|NUMERIC]`: The data type returned by the template; i.e. NUMERIC, BOOLEAN [required]
1154
- * `-p, --params TEXT`: A list of key/value pairs for parameters; ex. -p column=COLUMN_REFERENCE -p table=STRING [required]
1176
+ * `-sn, --source_name TEXT`: The name of the source where the template will be defined
1177
+ * `-tn, --name TEXT`: The user defined name of the template
1178
+ * `-tb, --body TEXT`: The string to define the template
1179
+ * `-rt, --returns [BOOLEAN|NUMERIC]`: The data type returned by the template; i.e. NUMERIC, BOOLEAN
1180
+ * `-p, --params TEXT`: A list of key/value pairs for parameters; ex. -p column=COLUMN_REFERENCE -p table=STRING
1155
1181
  * `-id, --template_id INTEGER`: The template ID (Only required when updating a template). [default: 0]
1182
+ * `-tf, --template_file TEXT`: A file containing a template definition.
1156
1183
  * `--help`: Show this message and exit.
1157
1184
 
1158
1185
  ## `bigeye catalog upsert-virtual-table`
@@ -1510,7 +1537,7 @@ $ bigeye deltas suggest-deltas [OPTIONS]
1510
1537
  * `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
1511
1538
  * `-source, --source_selector TEXT`: The pattern of tables in the source to select. Wildcard (*) indicates all tables or all schemas, e.g. source_1.*.* would be all schemas in source_1. [required]
1512
1539
  * `-target, --target_selector TEXT`: The pattern of tables in the target to select. Wildcard (*) indicates all tables or all schemas, e.g. source_2.*.* would be all schemas in source_2. [required]
1513
- * `-mt, --match_type [strict|fuzzy]`: How to match tables between the source and target destinations. Strict will only create relations if table names match exactly, Fuzzy will attempt to create relations using a fuzzy match. [default: MatchType.STRICT]
1540
+ * `-mt, --match_type [strict|fuzzy]`: How to match tables between the source and target destinations. Strict will only create relations if table names match exactly, Fuzzy will attempt to create relations using a fuzzy match. [default: strict]
1514
1541
  * `-op, --output_path TEXT`: File to write the delta configuration. [required]
1515
1542
  * `--help`: Show this message and exit.
1516
1543
 
@@ -1777,7 +1804,6 @@ $ bigeye lineage infer-relations [OPTIONS]
1777
1804
  * `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
1778
1805
  * `-upstream, --upstream_selector TEXT`: The pattern of tables in the upstream source to select. Wildcard (*) indicates all tables or all schemas, e.g. source_1.*.* would be all schemas in source_1.
1779
1806
  * `-downstream, --downstream_selector TEXT`: The pattern of tables in the downstream source to select. Wildcard (*) indicates all tables or all schemas, e.g. source_2.*.* would be all schemas in source_2.
1780
- * `-mt, --match_type [strict|fuzzy]`: How to match tables between the source and target destinations. Strict will only create relations if table names match exactly, Fuzzy will attempt to create relations using a fuzzy match. [default: MatchType.STRICT]
1807
+ * `-mt, --match_type [strict|fuzzy]`: How to match tables between the source and target destinations. Strict will only create relations if table names match exactly, Fuzzy will attempt to create relations using a fuzzy match. [default: strict]
1781
1808
  * `--help`: Show this message and exit.
1782
1809
 
1783
-
@@ -0,0 +1,198 @@
1
+ import os
2
+ from pathlib import Path
3
+ from typing import Optional, List
4
+
5
+ import typer
6
+
7
+ from bigeye_cli.functions import cli_client_factory
8
+ from bigeye_cli import global_options
9
+ from bigeye_cli.bigconfig import bigconfig_options
10
+ from bigeye_cli.model.github_report import GitHubReport
11
+ from bigeye_sdk.controller.metric_controller import MetricController
12
+ from bigeye_sdk.controller.metric_suite_controller import MetricSuiteController
13
+ from bigeye_sdk.generated.com.bigeye.models.generated import MetricInfoList
14
+ from bigeye_sdk.model.protobuf_message_facade import SimpleCollection
15
+ from bigeye_sdk.log import get_logger
16
+
17
+ log = get_logger(__file__)
18
+
19
+ app = typer.Typer(no_args_is_help=True, help="Bigconfig Commands for Bigeye CLI")
20
+
21
+ """
22
+ File should contain commands relating to deploying Bigconfig files.
23
+ """
24
+
25
+
26
+ @app.command()
27
+ def plan(
28
+ bigeye_conf: str = global_options.bigeye_conf,
29
+ config_file: str = global_options.config_file,
30
+ workspace: str = global_options.workspace,
31
+ input_path: Optional[List[str]] = bigconfig_options.input_path,
32
+ output_path: str = bigconfig_options.output_path,
33
+ purge_source_names: Optional[List[str]] = bigconfig_options.purge_source_names,
34
+ purge_all_sources: bool = bigconfig_options.purge_all_sources,
35
+ no_queue: bool = bigconfig_options.no_queue,
36
+ recursive: bool = bigconfig_options.recursive,
37
+ strict_mode: bool = bigconfig_options.strict_mode,
38
+ cicd: bool = typer.Option(
39
+ False,
40
+ "--cicd_report",
41
+ "-cicd",
42
+ help="Add the report to a pull request. (Github only)",
43
+ ),
44
+ ):
45
+ """Executes a plan for purging sources or processing bigconfig files in the input path/current
46
+ working directory."""
47
+
48
+ client = cli_client_factory(bigeye_conf, config_file, workspace)
49
+ mc = MetricSuiteController(client=client)
50
+
51
+ # Resolve args to first true or first non None values
52
+ if not input_path:
53
+ input_path = client.config.bigconfig_input_path or [Path.cwd()]
54
+ if not output_path:
55
+ output_path = client.config.bigconfig_output_path or Path.cwd()
56
+ strict_mode = strict_mode or client.config.bigconfig_strict_mode
57
+
58
+ if purge_source_names or purge_all_sources:
59
+ report = mc.execute_purge(
60
+ purge_source_names=purge_source_names,
61
+ purge_all_sources=purge_all_sources,
62
+ output_path=output_path,
63
+ apply=False,
64
+ )
65
+ else:
66
+ report = mc.execute_bigconfig(
67
+ input_path=input_path,
68
+ output_path=output_path,
69
+ apply=False,
70
+ recursive=recursive,
71
+ no_queue=no_queue,
72
+ strict_mode=strict_mode,
73
+ )
74
+ if cicd:
75
+ gh_report = GitHubReport(github_token=os.environ["GITHUB_TOKEN"])
76
+ gh_report.publish_bigconfig_plan(plan=report)
77
+
78
+
79
+ @app.command()
80
+ def apply(
81
+ bigeye_conf: str = global_options.bigeye_conf,
82
+ config_file: str = global_options.config_file,
83
+ workspace: str = global_options.workspace,
84
+ input_path: Optional[List[str]] = bigconfig_options.input_path,
85
+ output_path: str = bigconfig_options.output_path,
86
+ purge_source_names: Optional[List[str]] = bigconfig_options.purge_source_names,
87
+ purge_all_sources: bool = bigconfig_options.purge_all_sources,
88
+ no_queue: bool = bigconfig_options.no_queue,
89
+ recursive: bool = bigconfig_options.recursive,
90
+ strict_mode: bool = bigconfig_options.strict_mode,
91
+ auto_approve: bool = bigconfig_options.auto_approve,
92
+ ):
93
+ """Applies a purge of deployed metrics or applies Bigconfig files from the input path/current working directory to
94
+ the Bigeye workspace."""
95
+
96
+ client = cli_client_factory(bigeye_conf, config_file, workspace)
97
+ mc = MetricSuiteController(client=client)
98
+
99
+ # Resolve args to first true or first non None values
100
+ if not input_path:
101
+ input_path = client.config.bigconfig_input_path or [Path.cwd()]
102
+ if not output_path:
103
+ output_path = client.config.bigconfig_output_path or Path.cwd()
104
+ strict_mode = strict_mode or client.config.bigconfig_strict_mode
105
+ auto_approve = auto_approve or client.config.bigconfig_auto_approve
106
+
107
+ if purge_source_names or purge_all_sources:
108
+ mc.execute_purge(
109
+ purge_source_names=purge_source_names,
110
+ purge_all_sources=purge_all_sources,
111
+ output_path=output_path,
112
+ apply=True,
113
+ )
114
+ else:
115
+ mc.execute_bigconfig(
116
+ input_path=input_path,
117
+ output_path=output_path,
118
+ apply=True,
119
+ no_queue=no_queue,
120
+ recursive=recursive,
121
+ strict_mode=strict_mode,
122
+ auto_approve=auto_approve,
123
+ )
124
+
125
+
126
+ @app.command()
127
+ def export(
128
+ bigeye_conf: str = global_options.bigeye_conf,
129
+ config_file: str = global_options.config_file,
130
+ workspace: str = global_options.workspace,
131
+ output_path: str = bigconfig_options.output_path,
132
+ collection_id: int = typer.Option(
133
+ None, "--collection_id", "-cid", help="Collection ID of metrics to be exported."
134
+ ),
135
+ table_id: int = typer.Option(
136
+ None, "--table_id", "-tid", help="Table ID of metrics to be exported."
137
+ ),
138
+ metric_ids: List[int] = typer.Option(
139
+ None, "--metric_id", "-mid", help="Metric ID of metrics to be exported."
140
+ ),
141
+ ):
142
+ """Exports existing metrics into a valid Bigconfig file."""
143
+
144
+ client = cli_client_factory(bigeye_conf, config_file, workspace)
145
+ mc = MetricController(client=client)
146
+ collection: SimpleCollection = SimpleCollection(
147
+ name="Sample", description="SDK Generated"
148
+ )
149
+
150
+ # Require at least 1 option to be specified
151
+ if not collection_id and not table_id and not metric_ids:
152
+ raise typer.BadParameter(
153
+ "At least 1 option must be provided for bigconfig export. Please provide the "
154
+ "collection id (-cid), table id (-tid), or list of metric ids (-mid). "
155
+ )
156
+
157
+ # Get existing collection if passed
158
+ if collection_id:
159
+ collection: SimpleCollection = SimpleCollection.from_datawatch_object(
160
+ client.get_collection(collection_id=collection_id).collection
161
+ )
162
+ metric_ids.extend(collection.metric_ids)
163
+
164
+ # Get metrics from table if passed
165
+ if table_id:
166
+ metrics_from_table = client.get_metric_info_batch_post(
167
+ table_ids=[table_id]
168
+ ).metrics
169
+ metric_ids.extend([m.metric_configuration.id for m in metrics_from_table])
170
+ if not metrics_from_table:
171
+ raise typer.BadParameter(
172
+ f"No metrics found for given table id. Please check arguments and try again."
173
+ )
174
+ if not collection_id:
175
+ collection.name = metrics_from_table[0].metric_metadata.dataset_name
176
+
177
+ # Pull metric information
178
+ metrics: MetricInfoList = client.get_metric_info_batch_post(metric_ids=metric_ids)
179
+
180
+ if not output_path:
181
+ output_path = client.config.bigconfig_output_path or Path.cwd()
182
+
183
+ if not metrics.metrics:
184
+ raise typer.BadParameter(
185
+ "No metrics found for given arguments. Please check again."
186
+ )
187
+
188
+ bigconfig = mc.metric_info_to_bigconfig(metric_info=metrics, collection=collection)
189
+
190
+ file_name = collection.name.lower().replace(" ", "_")
191
+ output = bigconfig.save(
192
+ output_path=output_path,
193
+ default_file_name=f"{file_name}.bigconfig",
194
+ custom_formatter=bigconfig.format_bigconfig_export,
195
+ )
196
+ typer.secho(
197
+ f"\nSample bigconfig file generated at: {output}\n", fg="green", bold=True
198
+ )