bigeye-cli 0.3.63__tar.gz → 0.3.65__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.3.63 → bigeye_cli-0.3.65}/PKG-INFO +64 -42
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/CLI_DOCS.md +63 -40
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/catalog/catalog_commands.py +0 -70
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/configure/configure_commands.py +62 -48
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/functions.py +65 -4
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/issues/issue_commands.py +3 -3
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/pyproject.toml +2 -2
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/LICENSE +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/__main__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/__version__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/bigconfig/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/bigconfig/bigconfig_commands.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/bigconfig/bigconfig_options.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/catalog/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/collections/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/collections/collection_commands.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/configure/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/deltas/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/deltas/deltas_commands.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/enums.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/exceptions/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/exceptions/exceptions.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/global_options.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/issues/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/lineage/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/lineage/lineage_commands.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/metric/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/metric/metric_commands.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/model/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/model/cicd_conf.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/model/github_report.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/model/vendor_report.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/bigeye_cli/workspace/__init__.py +0 -0
- {bigeye_cli-0.3.63 → bigeye_cli-0.3.65}/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.
|
|
3
|
+
Version: 0.3.65
|
|
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
|
|
@@ -12,7 +12,6 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.9
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
16
15
|
Requires-Dist: PyGithub (>=1.57,<2.0)
|
|
17
16
|
Requires-Dist: bigeye-sdk (>=0.4.84,<0.5.0)
|
|
18
17
|
Requires-Dist: click (>=8.0.4,<9.0.0)
|
|
@@ -20,7 +19,7 @@ Requires-Dist: rich (>=12.4.4,<13.0.0)
|
|
|
20
19
|
Description-Content-Type: text/markdown
|
|
21
20
|
|
|
22
21
|
# **Bigeye CLI**
|
|
23
|
-
Version: 0.3.
|
|
22
|
+
Version: 0.3.65
|
|
24
23
|
## Installation
|
|
25
24
|
|
|
26
25
|
**Setting up your local/build environment**
|
|
@@ -192,9 +191,7 @@ password = fakepassword1234
|
|
|
192
191
|
|
|
193
192
|
**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.
|
|
194
193
|
|
|
195
|
-
# CLI Documentation
|
|
196
|
-
|
|
197
|
-
# `bigeye configure`
|
|
194
|
+
# CLI Documentation# `bigeye configure`
|
|
198
195
|
|
|
199
196
|
Configuration Commands for Bigeye CLI
|
|
200
197
|
|
|
@@ -235,7 +232,6 @@ $ bigeye configure get [OPTIONS] [SETTING_KEY]
|
|
|
235
232
|
|
|
236
233
|
**Options**:
|
|
237
234
|
|
|
238
|
-
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
239
235
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
240
236
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
241
237
|
* `--help`: Show this message and exit.
|
|
@@ -254,7 +250,6 @@ $ bigeye configure list [OPTIONS]
|
|
|
254
250
|
|
|
255
251
|
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
256
252
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
257
|
-
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
258
253
|
* `--help`: Show this message and exit.
|
|
259
254
|
|
|
260
255
|
## `bigeye configure set`
|
|
@@ -274,7 +269,6 @@ $ bigeye configure set [OPTIONS] [SETTING_KEY] [SETTING_VALUE]
|
|
|
274
269
|
|
|
275
270
|
**Options**:
|
|
276
271
|
|
|
277
|
-
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
278
272
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
279
273
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
280
274
|
* `--help`: Show this message and exit.
|
|
@@ -308,6 +302,7 @@ $ bigeye workspace [OPTIONS] COMMAND [ARGS]...
|
|
|
308
302
|
* `schedule-all-metrics`: Schedule all metrics in a workspace.
|
|
309
303
|
* `unschedule-all-metrics`: Unschedule all metrics in a workspace.
|
|
310
304
|
* `upsert-group`: Create or update a group.
|
|
305
|
+
* `upsert-named-schedule`: Create a named, cron based schedule
|
|
311
306
|
* `upsert-workspace`: Create or update a workspace.
|
|
312
307
|
|
|
313
308
|
## `bigeye workspace create-named-schedule`
|
|
@@ -534,6 +529,25 @@ $ bigeye workspace upsert-group [OPTIONS]
|
|
|
534
529
|
* `-id, --group_id INTEGER`: Group ID.
|
|
535
530
|
* `--help`: Show this message and exit.
|
|
536
531
|
|
|
532
|
+
## `bigeye workspace upsert-named-schedule`
|
|
533
|
+
|
|
534
|
+
Create a named, cron based schedule
|
|
535
|
+
|
|
536
|
+
**Usage**:
|
|
537
|
+
|
|
538
|
+
```console
|
|
539
|
+
$ bigeye workspace upsert-named-schedule [OPTIONS]
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
**Options**:
|
|
543
|
+
|
|
544
|
+
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
545
|
+
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
546
|
+
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
547
|
+
* `-sn, --name TEXT`: The user defined name of the schedule [required]
|
|
548
|
+
* `-c, --cron TEXT`: The cron string to define the schedule [required]
|
|
549
|
+
* `--help`: Show this message and exit.
|
|
550
|
+
|
|
537
551
|
## `bigeye workspace upsert-workspace`
|
|
538
552
|
|
|
539
553
|
Create or update a workspace.
|
|
@@ -645,6 +659,7 @@ $ bigeye bigconfig plan [OPTIONS]
|
|
|
645
659
|
* `-nq, --no_queue`: Don't submit to queue: True or False.
|
|
646
660
|
* `-r, --recursive`: Search all input directories recursively.
|
|
647
661
|
* `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
|
|
662
|
+
* `-cicd, --cicd_report`: Add the report to a pull request. (Github only)
|
|
648
663
|
* `--help`: Show this message and exit.
|
|
649
664
|
|
|
650
665
|
# `bigeye catalog`
|
|
@@ -672,7 +687,6 @@ $ bigeye catalog [OPTIONS] COMMAND [ARGS]...
|
|
|
672
687
|
* `delete-source`: Delete a source from specified Bigeye...
|
|
673
688
|
* `delete-template`: Delete a template.
|
|
674
689
|
* `delete-virtual-table`: Delete a virtual table.
|
|
675
|
-
* `deploy-all-autometrics`: Deploys all Autometrics to specified...
|
|
676
690
|
* `get-all-metric-templates`: Retrieve all metric templates and output...
|
|
677
691
|
* `get-metric-info`: Outputs metric info to a file.
|
|
678
692
|
* `get-metric-queries`: Gets the debug queries for all metrics by...
|
|
@@ -684,6 +698,7 @@ $ bigeye catalog [OPTIONS] COMMAND [ARGS]...
|
|
|
684
698
|
* `run-metrics`: Runs metrics by warehouse id, schema...
|
|
685
699
|
* `schedule-all-metrics`: Updates schedule for all metrics in a...
|
|
686
700
|
* `set-metric-time`: Sets metric times from a list of possible...
|
|
701
|
+
* `track-schema-changes`: Track schema changes for sources on demand...
|
|
687
702
|
* `unschedule-all-metrics`: Unschedule all metrics by warehouse,...
|
|
688
703
|
* `unset-metric-time`: Unsets metric times for whole warehouse or...
|
|
689
704
|
* `upsert-template`: Create or update a template for a source.
|
|
@@ -771,7 +786,7 @@ $ bigeye catalog delete-metrics [OPTIONS]
|
|
|
771
786
|
* `-wid, --warehouse_id INTEGER`: Warehouse ID
|
|
772
787
|
* `-sn, --schema_name TEXT`: List of Schema Names. E.g. -sn schema_1 -sn schema_2.
|
|
773
788
|
* `-tid, --table_id INTEGER`: Table IDs. E.g. -tid 123 -tid 124
|
|
774
|
-
* `-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
|
|
789
|
+
* `-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
|
|
775
790
|
* `--help`: Show this message and exit.
|
|
776
791
|
|
|
777
792
|
## `bigeye catalog delete-source`
|
|
@@ -829,29 +844,6 @@ $ bigeye catalog delete-virtual-table [OPTIONS]
|
|
|
829
844
|
* `-sn, --source_name TEXT`: The name of the source where the template will be defined [required]
|
|
830
845
|
* `--help`: Show this message and exit.
|
|
831
846
|
|
|
832
|
-
## `bigeye catalog deploy-all-autometrics`
|
|
833
|
-
|
|
834
|
-
Deploys all Autometrics to specified warehouse OR warehouse and list of schema names OR warehouse and list of
|
|
835
|
-
table ids.
|
|
836
|
-
|
|
837
|
-
**Usage**:
|
|
838
|
-
|
|
839
|
-
```console
|
|
840
|
-
$ bigeye catalog deploy-all-autometrics [OPTIONS]
|
|
841
|
-
```
|
|
842
|
-
|
|
843
|
-
**Options**:
|
|
844
|
-
|
|
845
|
-
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
846
|
-
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
847
|
-
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
848
|
-
* `-wid, --warehouse_id INTEGER`: Deploy autometrics to all tables in warehouse.
|
|
849
|
-
* `-sn, --schema_name TEXT`: List of Schema Names. E.g. -sn schema_1 -sn schema_2.
|
|
850
|
-
* `-tid, --table_id INTEGER`: Table IDs. E.g. -tid 123 -tid 124
|
|
851
|
-
* `-lbd, --lookback_days INTEGER`: Look back days for the metrics. [default: 7]
|
|
852
|
-
* `--ops_only`: Deploy only operational metrics [default: True]
|
|
853
|
-
* `--help`: Show this message and exit.
|
|
854
|
-
|
|
855
847
|
## `bigeye catalog get-all-metric-templates`
|
|
856
848
|
|
|
857
849
|
Retrieve all metric templates and output to a file.
|
|
@@ -1094,6 +1086,32 @@ $ bigeye catalog set-metric-time [OPTIONS]
|
|
|
1094
1086
|
* `-r, --replace`: replace metric times if already present on tables? Default is false.
|
|
1095
1087
|
* `--help`: Show this message and exit.
|
|
1096
1088
|
|
|
1089
|
+
## `bigeye catalog track-schema-changes`
|
|
1090
|
+
|
|
1091
|
+
Track schema changes for sources on demand or every n hour(s) and notify specified channels.
|
|
1092
|
+
Environment variables SMTP_USER and SMTP_PASSWORD MUST be set if using email notification.
|
|
1093
|
+
|
|
1094
|
+
**Usage**:
|
|
1095
|
+
|
|
1096
|
+
```console
|
|
1097
|
+
$ bigeye catalog track-schema-changes [OPTIONS]
|
|
1098
|
+
```
|
|
1099
|
+
|
|
1100
|
+
**Options**:
|
|
1101
|
+
|
|
1102
|
+
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
1103
|
+
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1104
|
+
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1105
|
+
* `-src, --source TEXT`: A list of source names to track. (None will track changes from all sources)
|
|
1106
|
+
* `-s, --since TEXT`: Track schema changes from this date. (Formatted as yyyy-MM-dd) [default: 1970-01-01]
|
|
1107
|
+
* `-f, --frequency INTEGER`: Every n hours to check for schema changes. (None will only run the check once) [default: 0]
|
|
1108
|
+
* `-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]
|
|
1109
|
+
* `-nc, --channel TEXT`: A list of notification channels; e.g. -nc email@mydomain.com -nc #slack_channel -nc https://www.webhook.com
|
|
1110
|
+
* `-smtp, --server TEXT`: The server to send emails.
|
|
1111
|
+
* `-p, --port INTEGER`: The server port to send emails. [default: 587]
|
|
1112
|
+
* `-t, --token TEXT`: The token to utilize the Slack web client. (Will attempt to use environment variable SLACK_BOT_TOKEN, if not set)
|
|
1113
|
+
* `--help`: Show this message and exit.
|
|
1114
|
+
|
|
1097
1115
|
## `bigeye catalog unschedule-all-metrics`
|
|
1098
1116
|
|
|
1099
1117
|
Unschedule all metrics by warehouse, schema or tables.
|
|
@@ -1148,12 +1166,13 @@ $ bigeye catalog upsert-template [OPTIONS]
|
|
|
1148
1166
|
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
1149
1167
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1150
1168
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1151
|
-
* `-sn, --source_name TEXT`: The name of the source where the template will be defined
|
|
1152
|
-
* `-tn, --name TEXT`: The user defined name of the template
|
|
1153
|
-
* `-tb, --body TEXT`: The string to define the template
|
|
1154
|
-
* `-rt, --returns [BOOLEAN|NUMERIC]`: The data type returned by the template; i.e. NUMERIC, BOOLEAN
|
|
1155
|
-
* `-p, --params TEXT`: A list of key/value pairs for parameters; ex. -p column=COLUMN_REFERENCE -p table=STRING
|
|
1169
|
+
* `-sn, --source_name TEXT`: The name of the source where the template will be defined
|
|
1170
|
+
* `-tn, --name TEXT`: The user defined name of the template
|
|
1171
|
+
* `-tb, --body TEXT`: The string to define the template
|
|
1172
|
+
* `-rt, --returns [BOOLEAN|NUMERIC]`: The data type returned by the template; i.e. NUMERIC, BOOLEAN
|
|
1173
|
+
* `-p, --params TEXT`: A list of key/value pairs for parameters; ex. -p column=COLUMN_REFERENCE -p table=STRING
|
|
1156
1174
|
* `-id, --template_id INTEGER`: The template ID (Only required when updating a template). [default: 0]
|
|
1175
|
+
* `-tf, --template_file TEXT`: A file containing a template definition.
|
|
1157
1176
|
* `--help`: Show this message and exit.
|
|
1158
1177
|
|
|
1159
1178
|
## `bigeye catalog upsert-virtual-table`
|
|
@@ -1222,7 +1241,7 @@ $ bigeye metric dbt-tests-to-metrics [OPTIONS]
|
|
|
1222
1241
|
* `-sf, --schema_file TEXT`: The path to the dbt schema file [required]
|
|
1223
1242
|
* `-auto, --use_auto`: Use autothresholds over default constant
|
|
1224
1243
|
* `-bigconfig, --to_bigconfig`: Convert the dbt tests to bigconfig.
|
|
1225
|
-
* `-op, --output_path TEXT`: Output path where bigconfig file will be saved. If no output path is defined then current working directory will be used. Requires --to_bigconfig to be true. [default: /
|
|
1244
|
+
* `-op, --output_path TEXT`: Output path where bigconfig file will be saved. If no output path is defined then current working directory will be used. Requires --to_bigconfig to be true. [default: /home/runner/work/semantic-data-platform/semantic-data-platform/bigeye-integrations/bigeye-cli]
|
|
1226
1245
|
* `--help`: Show this message and exit.
|
|
1227
1246
|
|
|
1228
1247
|
## `bigeye metric get-info`
|
|
@@ -1511,7 +1530,7 @@ $ bigeye deltas suggest-deltas [OPTIONS]
|
|
|
1511
1530
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1512
1531
|
* `-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]
|
|
1513
1532
|
* `-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]
|
|
1514
|
-
* `-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:
|
|
1533
|
+
* `-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]
|
|
1515
1534
|
* `-op, --output_path TEXT`: File to write the delta configuration. [required]
|
|
1516
1535
|
* `--help`: Show this message and exit.
|
|
1517
1536
|
|
|
@@ -1720,6 +1739,7 @@ $ bigeye lineage create-relation [OPTIONS]
|
|
|
1720
1739
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1721
1740
|
* `-up, --upstream TEXT`: The fully qualified table name [required]
|
|
1722
1741
|
* `-down, --downstream TEXT`: The fully qualified table name [required]
|
|
1742
|
+
* `-co, --column_overrides TEXT`: The list of column overrides, formatted as upstream_column_name:downstream_column_name
|
|
1723
1743
|
* `--help`: Show this message and exit.
|
|
1724
1744
|
|
|
1725
1745
|
## `bigeye lineage delete-node`
|
|
@@ -1778,7 +1798,9 @@ $ bigeye lineage infer-relations [OPTIONS]
|
|
|
1778
1798
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1779
1799
|
* `-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.
|
|
1780
1800
|
* `-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.
|
|
1781
|
-
* `-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:
|
|
1801
|
+
* `-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]
|
|
1802
|
+
* `-lc, --lineage_conf TEXT`: The path to a Simple Lineage configuration file.
|
|
1803
|
+
* `-purge, --purge_lineage`: Purge all lineage edges.
|
|
1782
1804
|
* `--help`: Show this message and exit.
|
|
1783
1805
|
|
|
1784
1806
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# **Bigeye CLI**
|
|
2
|
-
Version: 0.3.
|
|
2
|
+
Version: 0.3.65
|
|
3
3
|
## Installation
|
|
4
4
|
|
|
5
5
|
**Setting up your local/build environment**
|
|
@@ -171,9 +171,7 @@ password = fakepassword1234
|
|
|
171
171
|
|
|
172
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.
|
|
173
173
|
|
|
174
|
-
# CLI Documentation
|
|
175
|
-
|
|
176
|
-
# `bigeye configure`
|
|
174
|
+
# CLI Documentation# `bigeye configure`
|
|
177
175
|
|
|
178
176
|
Configuration Commands for Bigeye CLI
|
|
179
177
|
|
|
@@ -214,7 +212,6 @@ $ bigeye configure get [OPTIONS] [SETTING_KEY]
|
|
|
214
212
|
|
|
215
213
|
**Options**:
|
|
216
214
|
|
|
217
|
-
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
218
215
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
219
216
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
220
217
|
* `--help`: Show this message and exit.
|
|
@@ -233,7 +230,6 @@ $ bigeye configure list [OPTIONS]
|
|
|
233
230
|
|
|
234
231
|
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
235
232
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
236
|
-
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
237
233
|
* `--help`: Show this message and exit.
|
|
238
234
|
|
|
239
235
|
## `bigeye configure set`
|
|
@@ -253,7 +249,6 @@ $ bigeye configure set [OPTIONS] [SETTING_KEY] [SETTING_VALUE]
|
|
|
253
249
|
|
|
254
250
|
**Options**:
|
|
255
251
|
|
|
256
|
-
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
257
252
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
258
253
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
259
254
|
* `--help`: Show this message and exit.
|
|
@@ -287,6 +282,7 @@ $ bigeye workspace [OPTIONS] COMMAND [ARGS]...
|
|
|
287
282
|
* `schedule-all-metrics`: Schedule all metrics in a workspace.
|
|
288
283
|
* `unschedule-all-metrics`: Unschedule all metrics in a workspace.
|
|
289
284
|
* `upsert-group`: Create or update a group.
|
|
285
|
+
* `upsert-named-schedule`: Create a named, cron based schedule
|
|
290
286
|
* `upsert-workspace`: Create or update a workspace.
|
|
291
287
|
|
|
292
288
|
## `bigeye workspace create-named-schedule`
|
|
@@ -513,6 +509,25 @@ $ bigeye workspace upsert-group [OPTIONS]
|
|
|
513
509
|
* `-id, --group_id INTEGER`: Group ID.
|
|
514
510
|
* `--help`: Show this message and exit.
|
|
515
511
|
|
|
512
|
+
## `bigeye workspace upsert-named-schedule`
|
|
513
|
+
|
|
514
|
+
Create a named, cron based schedule
|
|
515
|
+
|
|
516
|
+
**Usage**:
|
|
517
|
+
|
|
518
|
+
```console
|
|
519
|
+
$ bigeye workspace upsert-named-schedule [OPTIONS]
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
**Options**:
|
|
523
|
+
|
|
524
|
+
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
525
|
+
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
526
|
+
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
527
|
+
* `-sn, --name TEXT`: The user defined name of the schedule [required]
|
|
528
|
+
* `-c, --cron TEXT`: The cron string to define the schedule [required]
|
|
529
|
+
* `--help`: Show this message and exit.
|
|
530
|
+
|
|
516
531
|
## `bigeye workspace upsert-workspace`
|
|
517
532
|
|
|
518
533
|
Create or update a workspace.
|
|
@@ -624,6 +639,7 @@ $ bigeye bigconfig plan [OPTIONS]
|
|
|
624
639
|
* `-nq, --no_queue`: Don't submit to queue: True or False.
|
|
625
640
|
* `-r, --recursive`: Search all input directories recursively.
|
|
626
641
|
* `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
|
|
642
|
+
* `-cicd, --cicd_report`: Add the report to a pull request. (Github only)
|
|
627
643
|
* `--help`: Show this message and exit.
|
|
628
644
|
|
|
629
645
|
# `bigeye catalog`
|
|
@@ -651,7 +667,6 @@ $ bigeye catalog [OPTIONS] COMMAND [ARGS]...
|
|
|
651
667
|
* `delete-source`: Delete a source from specified Bigeye...
|
|
652
668
|
* `delete-template`: Delete a template.
|
|
653
669
|
* `delete-virtual-table`: Delete a virtual table.
|
|
654
|
-
* `deploy-all-autometrics`: Deploys all Autometrics to specified...
|
|
655
670
|
* `get-all-metric-templates`: Retrieve all metric templates and output...
|
|
656
671
|
* `get-metric-info`: Outputs metric info to a file.
|
|
657
672
|
* `get-metric-queries`: Gets the debug queries for all metrics by...
|
|
@@ -663,6 +678,7 @@ $ bigeye catalog [OPTIONS] COMMAND [ARGS]...
|
|
|
663
678
|
* `run-metrics`: Runs metrics by warehouse id, schema...
|
|
664
679
|
* `schedule-all-metrics`: Updates schedule for all metrics in a...
|
|
665
680
|
* `set-metric-time`: Sets metric times from a list of possible...
|
|
681
|
+
* `track-schema-changes`: Track schema changes for sources on demand...
|
|
666
682
|
* `unschedule-all-metrics`: Unschedule all metrics by warehouse,...
|
|
667
683
|
* `unset-metric-time`: Unsets metric times for whole warehouse or...
|
|
668
684
|
* `upsert-template`: Create or update a template for a source.
|
|
@@ -750,7 +766,7 @@ $ bigeye catalog delete-metrics [OPTIONS]
|
|
|
750
766
|
* `-wid, --warehouse_id INTEGER`: Warehouse ID
|
|
751
767
|
* `-sn, --schema_name TEXT`: List of Schema Names. E.g. -sn schema_1 -sn schema_2.
|
|
752
768
|
* `-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
|
|
769
|
+
* `-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
770
|
* `--help`: Show this message and exit.
|
|
755
771
|
|
|
756
772
|
## `bigeye catalog delete-source`
|
|
@@ -808,29 +824,6 @@ $ bigeye catalog delete-virtual-table [OPTIONS]
|
|
|
808
824
|
* `-sn, --source_name TEXT`: The name of the source where the template will be defined [required]
|
|
809
825
|
* `--help`: Show this message and exit.
|
|
810
826
|
|
|
811
|
-
## `bigeye catalog deploy-all-autometrics`
|
|
812
|
-
|
|
813
|
-
Deploys all Autometrics to specified warehouse OR warehouse and list of schema names OR warehouse and list of
|
|
814
|
-
table ids.
|
|
815
|
-
|
|
816
|
-
**Usage**:
|
|
817
|
-
|
|
818
|
-
```console
|
|
819
|
-
$ bigeye catalog deploy-all-autometrics [OPTIONS]
|
|
820
|
-
```
|
|
821
|
-
|
|
822
|
-
**Options**:
|
|
823
|
-
|
|
824
|
-
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
825
|
-
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
826
|
-
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
827
|
-
* `-wid, --warehouse_id INTEGER`: Deploy autometrics to all tables in warehouse.
|
|
828
|
-
* `-sn, --schema_name TEXT`: List of Schema Names. E.g. -sn schema_1 -sn schema_2.
|
|
829
|
-
* `-tid, --table_id INTEGER`: Table IDs. E.g. -tid 123 -tid 124
|
|
830
|
-
* `-lbd, --lookback_days INTEGER`: Look back days for the metrics. [default: 7]
|
|
831
|
-
* `--ops_only`: Deploy only operational metrics [default: True]
|
|
832
|
-
* `--help`: Show this message and exit.
|
|
833
|
-
|
|
834
827
|
## `bigeye catalog get-all-metric-templates`
|
|
835
828
|
|
|
836
829
|
Retrieve all metric templates and output to a file.
|
|
@@ -1073,6 +1066,32 @@ $ bigeye catalog set-metric-time [OPTIONS]
|
|
|
1073
1066
|
* `-r, --replace`: replace metric times if already present on tables? Default is false.
|
|
1074
1067
|
* `--help`: Show this message and exit.
|
|
1075
1068
|
|
|
1069
|
+
## `bigeye catalog track-schema-changes`
|
|
1070
|
+
|
|
1071
|
+
Track schema changes for sources on demand or every n hour(s) and notify specified channels.
|
|
1072
|
+
Environment variables SMTP_USER and SMTP_PASSWORD MUST be set if using email notification.
|
|
1073
|
+
|
|
1074
|
+
**Usage**:
|
|
1075
|
+
|
|
1076
|
+
```console
|
|
1077
|
+
$ bigeye catalog track-schema-changes [OPTIONS]
|
|
1078
|
+
```
|
|
1079
|
+
|
|
1080
|
+
**Options**:
|
|
1081
|
+
|
|
1082
|
+
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
1083
|
+
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1084
|
+
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1085
|
+
* `-src, --source TEXT`: A list of source names to track. (None will track changes from all sources)
|
|
1086
|
+
* `-s, --since TEXT`: Track schema changes from this date. (Formatted as yyyy-MM-dd) [default: 1970-01-01]
|
|
1087
|
+
* `-f, --frequency INTEGER`: Every n hours to check for schema changes. (None will only run the check once) [default: 0]
|
|
1088
|
+
* `-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]
|
|
1089
|
+
* `-nc, --channel TEXT`: A list of notification channels; e.g. -nc email@mydomain.com -nc #slack_channel -nc https://www.webhook.com
|
|
1090
|
+
* `-smtp, --server TEXT`: The server to send emails.
|
|
1091
|
+
* `-p, --port INTEGER`: The server port to send emails. [default: 587]
|
|
1092
|
+
* `-t, --token TEXT`: The token to utilize the Slack web client. (Will attempt to use environment variable SLACK_BOT_TOKEN, if not set)
|
|
1093
|
+
* `--help`: Show this message and exit.
|
|
1094
|
+
|
|
1076
1095
|
## `bigeye catalog unschedule-all-metrics`
|
|
1077
1096
|
|
|
1078
1097
|
Unschedule all metrics by warehouse, schema or tables.
|
|
@@ -1127,12 +1146,13 @@ $ bigeye catalog upsert-template [OPTIONS]
|
|
|
1127
1146
|
* `-b, --bigeye_conf TEXT`: Bigeye Credential File Path [env var: BIGEYE_API_CRED_FILE]
|
|
1128
1147
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1129
1148
|
* `-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
|
|
1131
|
-
* `-tn, --name TEXT`: The user defined name of the template
|
|
1132
|
-
* `-tb, --body TEXT`: The string to define the template
|
|
1133
|
-
* `-rt, --returns [BOOLEAN|NUMERIC]`: The data type returned by the template; i.e. NUMERIC, BOOLEAN
|
|
1134
|
-
* `-p, --params TEXT`: A list of key/value pairs for parameters; ex. -p column=COLUMN_REFERENCE -p table=STRING
|
|
1149
|
+
* `-sn, --source_name TEXT`: The name of the source where the template will be defined
|
|
1150
|
+
* `-tn, --name TEXT`: The user defined name of the template
|
|
1151
|
+
* `-tb, --body TEXT`: The string to define the template
|
|
1152
|
+
* `-rt, --returns [BOOLEAN|NUMERIC]`: The data type returned by the template; i.e. NUMERIC, BOOLEAN
|
|
1153
|
+
* `-p, --params TEXT`: A list of key/value pairs for parameters; ex. -p column=COLUMN_REFERENCE -p table=STRING
|
|
1135
1154
|
* `-id, --template_id INTEGER`: The template ID (Only required when updating a template). [default: 0]
|
|
1155
|
+
* `-tf, --template_file TEXT`: A file containing a template definition.
|
|
1136
1156
|
* `--help`: Show this message and exit.
|
|
1137
1157
|
|
|
1138
1158
|
## `bigeye catalog upsert-virtual-table`
|
|
@@ -1201,7 +1221,7 @@ $ bigeye metric dbt-tests-to-metrics [OPTIONS]
|
|
|
1201
1221
|
* `-sf, --schema_file TEXT`: The path to the dbt schema file [required]
|
|
1202
1222
|
* `-auto, --use_auto`: Use autothresholds over default constant
|
|
1203
1223
|
* `-bigconfig, --to_bigconfig`: Convert the dbt tests to bigconfig.
|
|
1204
|
-
* `-op, --output_path TEXT`: Output path where bigconfig file will be saved. If no output path is defined then current working directory will be used. Requires --to_bigconfig to be true. [default: /
|
|
1224
|
+
* `-op, --output_path TEXT`: Output path where bigconfig file will be saved. If no output path is defined then current working directory will be used. Requires --to_bigconfig to be true. [default: /home/runner/work/semantic-data-platform/semantic-data-platform/bigeye-integrations/bigeye-cli]
|
|
1205
1225
|
* `--help`: Show this message and exit.
|
|
1206
1226
|
|
|
1207
1227
|
## `bigeye metric get-info`
|
|
@@ -1490,7 +1510,7 @@ $ bigeye deltas suggest-deltas [OPTIONS]
|
|
|
1490
1510
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1491
1511
|
* `-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
1512
|
* `-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:
|
|
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: strict]
|
|
1494
1514
|
* `-op, --output_path TEXT`: File to write the delta configuration. [required]
|
|
1495
1515
|
* `--help`: Show this message and exit.
|
|
1496
1516
|
|
|
@@ -1699,6 +1719,7 @@ $ bigeye lineage create-relation [OPTIONS]
|
|
|
1699
1719
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1700
1720
|
* `-up, --upstream TEXT`: The fully qualified table name [required]
|
|
1701
1721
|
* `-down, --downstream TEXT`: The fully qualified table name [required]
|
|
1722
|
+
* `-co, --column_overrides TEXT`: The list of column overrides, formatted as upstream_column_name:downstream_column_name
|
|
1702
1723
|
* `--help`: Show this message and exit.
|
|
1703
1724
|
|
|
1704
1725
|
## `bigeye lineage delete-node`
|
|
@@ -1757,6 +1778,8 @@ $ bigeye lineage infer-relations [OPTIONS]
|
|
|
1757
1778
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1758
1779
|
* `-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
1780
|
* `-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:
|
|
1781
|
+
* `-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]
|
|
1782
|
+
* `-lc, --lineage_conf TEXT`: The path to a Simple Lineage configuration file.
|
|
1783
|
+
* `-purge, --purge_lineage`: Purge all lineage edges.
|
|
1761
1784
|
* `--help`: Show this message and exit.
|
|
1762
1785
|
|
|
@@ -115,76 +115,6 @@ def regen_autometrics(
|
|
|
115
115
|
)
|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
@app.command()
|
|
119
|
-
def deploy_all_autometrics(
|
|
120
|
-
bigeye_conf: str = global_options.bigeye_conf,
|
|
121
|
-
config_file: str = global_options.config_file,
|
|
122
|
-
workspace: str = global_options.workspace,
|
|
123
|
-
warehouse_id: int = typer.Option(
|
|
124
|
-
None,
|
|
125
|
-
"--warehouse_id",
|
|
126
|
-
"-wid",
|
|
127
|
-
help="Deploy autometrics to all tables in warehouse.",
|
|
128
|
-
),
|
|
129
|
-
schema_names: Optional[List[str]] = typer.Option(
|
|
130
|
-
None,
|
|
131
|
-
"--schema_name",
|
|
132
|
-
"-sn",
|
|
133
|
-
help="List of Schema Names. E.g. -sn schema_1 -sn schema_2.",
|
|
134
|
-
),
|
|
135
|
-
table_ids: Optional[List[int]] = typer.Option(
|
|
136
|
-
None, "--table_id", "-tid", help="Table IDs. E.g. -tid 123 -tid 124"
|
|
137
|
-
),
|
|
138
|
-
lookback_days: int = typer.Option(
|
|
139
|
-
7, "--lookback_days", "-lbd", help="Look back days for the metrics."
|
|
140
|
-
),
|
|
141
|
-
ops_only: bool = typer.Option(
|
|
142
|
-
True, "--ops_only", help="Deploy only operational metrics"
|
|
143
|
-
),
|
|
144
|
-
):
|
|
145
|
-
"""Deploys all Autometrics to specified warehouse OR warehouse and list of schema names OR warehouse and list of
|
|
146
|
-
table ids."""
|
|
147
|
-
# TODO: Add operational metrics only code.
|
|
148
|
-
log.info(f"Deploying all metrics.")
|
|
149
|
-
log.info(
|
|
150
|
-
f"Bigeye API Configuration: {bigeye_conf} | Warehouse ID: {warehouse_id} | Table IDs: {table_ids}"
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
client = cli_client_factory(bigeye_conf, config_file, workspace)
|
|
154
|
-
|
|
155
|
-
ms = MetricCreationState.METRIC_CREATION_STATE_SUGGESTED_AUTO
|
|
156
|
-
|
|
157
|
-
mil = MetricInfoList()
|
|
158
|
-
|
|
159
|
-
if not schema_names:
|
|
160
|
-
mil = client.get_metric_info_batch_post(
|
|
161
|
-
warehouse_ids=[warehouse_id],
|
|
162
|
-
table_ids=table_ids,
|
|
163
|
-
metric_creation_states=[ms],
|
|
164
|
-
)
|
|
165
|
-
|
|
166
|
-
if schema_names:
|
|
167
|
-
for sn in schema_names:
|
|
168
|
-
submil = client.get_metric_info_batch_post(
|
|
169
|
-
warehouse_ids=[warehouse_id],
|
|
170
|
-
table_ids=table_ids,
|
|
171
|
-
metric_creation_states=[ms],
|
|
172
|
-
schema_name=sn,
|
|
173
|
-
)
|
|
174
|
-
mil.metrics.extend(submil.metrics)
|
|
175
|
-
|
|
176
|
-
if ops_only:
|
|
177
|
-
mil.metrics = [
|
|
178
|
-
m
|
|
179
|
-
for m in mil.metrics
|
|
180
|
-
if m.metric_configuration.metric_type.predefined_metric in OPS_METRICS
|
|
181
|
-
]
|
|
182
|
-
|
|
183
|
-
mids: List[int] = [m.metric_configuration.id for m in mil.metrics]
|
|
184
|
-
|
|
185
|
-
client.accept_autometrics(metric_ids=mids, lookback_days=lookback_days)
|
|
186
|
-
|
|
187
|
-
|
|
188
118
|
@app.command()
|
|
189
119
|
def delete_metrics(
|
|
190
120
|
bigeye_conf: str = global_options.bigeye_conf,
|
|
@@ -2,19 +2,18 @@ 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
|
|
5
|
+
from typing import List
|
|
6
6
|
|
|
7
|
-
from bigeye_cli.functions import run_enum_menu
|
|
7
|
+
from bigeye_cli.functions import run_enum_menu, get_workspaces_for_user, get_workspace_id_for_user
|
|
8
8
|
from bigeye_cli import global_options
|
|
9
9
|
|
|
10
10
|
from bigeye_sdk.authentication.enums import AuthConfType, BrowserType
|
|
11
11
|
from bigeye_sdk.authentication.api_authentication import BasicAPIAuth, BrowserAPIAuth, ApiAuth, APIKeyAuth
|
|
12
12
|
from bigeye_sdk.authentication.config import Config
|
|
13
|
-
from bigeye_sdk.client.datawatch_client import get_user_auth
|
|
14
|
-
from bigeye_sdk.generated.com.bigeye.models.generated import
|
|
13
|
+
from bigeye_sdk.client.datawatch_client import get_user_auth, create_api_key_for_configuration
|
|
14
|
+
from bigeye_sdk.generated.com.bigeye.models.generated import WorkspaceIdNameAndRole
|
|
15
15
|
from bigeye_sdk.exceptions.exceptions import WorkspaceNotSetException
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
from bigeye_sdk.log import get_logger
|
|
19
18
|
|
|
20
19
|
log = get_logger(__file__)
|
|
@@ -29,6 +28,7 @@ def configure(
|
|
|
29
28
|
config_file: str = global_options.config_file,
|
|
30
29
|
workspace: str = global_options.workspace
|
|
31
30
|
):
|
|
31
|
+
required_config = {}
|
|
32
32
|
if ctx.invoked_subcommand is None:
|
|
33
33
|
"""Create a default credential for Bigeye CLI."""
|
|
34
34
|
from rich.prompt import Prompt, Confirm
|
|
@@ -36,11 +36,11 @@ def configure(
|
|
|
36
36
|
use_default_credential = True
|
|
37
37
|
if workspace != 'DEFAULT':
|
|
38
38
|
use_default_credential = Confirm.ask("Should this workspace inherit the default credentials?")
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
# If configuring the default workspace or user specifically asked to enter creds, then perform credential
|
|
41
41
|
# workflow
|
|
42
42
|
if workspace == 'DEFAULT' or not use_default_credential:
|
|
43
|
-
auth_type = run_enum_menu(enum_clz=AuthConfType, default=AuthConfType.
|
|
43
|
+
auth_type = run_enum_menu(enum_clz=AuthConfType, default=AuthConfType.API_KEY_AUTH)
|
|
44
44
|
|
|
45
45
|
if auth_type == AuthConfType.BROWSER_AUTH:
|
|
46
46
|
browser_type = run_enum_menu(enum_clz=BrowserType, default=BrowserType.CHROME)
|
|
@@ -49,14 +49,45 @@ def configure(
|
|
|
49
49
|
|
|
50
50
|
if browser_type == BrowserType.CHROME:
|
|
51
51
|
# TODO Could condition on path containing Profile_N directories.
|
|
52
|
-
browser_profile_user_name = Prompt.ask(
|
|
52
|
+
browser_profile_user_name = Prompt.ask(
|
|
53
|
+
"Enter the profile email if logged into Chrome (Default: None)")
|
|
53
54
|
base_url = Prompt.ask("Enter the Bigeye URL", default="https://app.bigeye.com")
|
|
54
55
|
cred = BrowserAPIAuth(browser=browser_type, base_url=base_url,
|
|
55
|
-
|
|
56
|
+
browser_profile_user_name=browser_profile_user_name)
|
|
56
57
|
|
|
57
58
|
elif auth_type == AuthConfType.API_KEY_AUTH:
|
|
58
59
|
base_url = Prompt.ask("Enter the Bigeye URL", default="https://app.bigeye.com")
|
|
59
|
-
|
|
60
|
+
username = Prompt.ask("Enter Bigeye username")
|
|
61
|
+
uses_sso = Confirm.ask("Do you use SSO to access the Bigeye UI?")
|
|
62
|
+
if not uses_sso:
|
|
63
|
+
print(Text(text='\n** Please login to continue **', style='bold green'))
|
|
64
|
+
password = Prompt.ask("Enter Bigeye password for username above", password=True)
|
|
65
|
+
create_key = Confirm.ask("Would you like to create an API Key?")
|
|
66
|
+
basic_cred = BasicAPIAuth(base_url=base_url,
|
|
67
|
+
user=username,
|
|
68
|
+
password=password)
|
|
69
|
+
if create_key:
|
|
70
|
+
key_name = Prompt.ask("Enter a name for the key")
|
|
71
|
+
key_description = Prompt.ask("Enter a description (optional)", default="")
|
|
72
|
+
api_key = create_api_key_for_configuration(
|
|
73
|
+
cred=basic_cred, name=key_name, description=key_description
|
|
74
|
+
)
|
|
75
|
+
else:
|
|
76
|
+
api_key = Prompt.ask("Enter the API Key", password=True)
|
|
77
|
+
|
|
78
|
+
required_config = get_workspaces_for_user(
|
|
79
|
+
cred=basic_cred, workspace=workspace, use_default_credential=use_default_credential
|
|
80
|
+
)
|
|
81
|
+
else:
|
|
82
|
+
print(Text(text='\n** Make sure you have created an API key in the UI **', style='bold green'))
|
|
83
|
+
api_key = Prompt.ask("Enter the API Key", password=True)
|
|
84
|
+
api_auth = APIKeyAuth(base_url=base_url, api_key=api_key)
|
|
85
|
+
required_config = get_workspace_id_for_user(cred=api_auth,
|
|
86
|
+
workspace=workspace,
|
|
87
|
+
use_default_credential=use_default_credential,
|
|
88
|
+
bigeye_username=username)
|
|
89
|
+
|
|
90
|
+
|
|
60
91
|
cred = APIKeyAuth(base_url=base_url, api_key=api_key)
|
|
61
92
|
|
|
62
93
|
else:
|
|
@@ -64,50 +95,35 @@ def configure(
|
|
|
64
95
|
username = Prompt.ask("Enter the username")
|
|
65
96
|
password = Prompt.ask("Enter the password", password=True)
|
|
66
97
|
cred = BasicAPIAuth(base_url=base_url,
|
|
67
|
-
user=username,
|
|
98
|
+
user=username,
|
|
99
|
+
password=password)
|
|
68
100
|
|
|
69
|
-
cred.save_as_file(auth_filename=bigeye_conf,cred=cred,workspace=workspace)
|
|
101
|
+
cred.save_as_file(auth_filename=bigeye_conf, cred=cred, workspace=workspace)
|
|
70
102
|
# If inheriting from default credential then load default credential
|
|
71
103
|
else:
|
|
72
|
-
cred = ApiAuth.load(auth_file=bigeye_conf,workspace='DEFAULT')
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
for wk in accessible_workspaces:
|
|
79
|
-
print(f'{wk.name} - {wk.id}')
|
|
80
|
-
required_config = {
|
|
81
|
-
"workspace_id": Prompt.ask(f"Enter Bigeye workspace ID for desired {workspace} configuration",
|
|
82
|
-
choices=[str(w.id) for w in accessible_workspaces]),
|
|
83
|
-
"use_default_credential": use_default_credential
|
|
84
|
-
}
|
|
85
|
-
elif len(accessible_workspaces) == 1:
|
|
86
|
-
required_config = {
|
|
87
|
-
"workspace_id": str(accessible_workspaces[0].id),
|
|
88
|
-
"use_default_credential": use_default_credential
|
|
89
|
-
}
|
|
90
|
-
else:
|
|
91
|
-
raise WorkspaceNotSetException(f'No workspace access detected. Please check with your Bigeye '
|
|
92
|
-
'administrators to obtain access to a workspace.')
|
|
104
|
+
cred = ApiAuth.load(auth_file=bigeye_conf, workspace='DEFAULT')
|
|
105
|
+
|
|
106
|
+
if not required_config:
|
|
107
|
+
required_config = get_workspaces_for_user(
|
|
108
|
+
cred=cred, workspace=workspace, use_default_credential=use_default_credential
|
|
109
|
+
)
|
|
93
110
|
|
|
94
111
|
Config(**required_config).upsert_workspace_config(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
112
|
+
config_file=config_file,
|
|
113
|
+
workspace=workspace)
|
|
114
|
+
|
|
98
115
|
|
|
99
116
|
@app.command()
|
|
100
117
|
def set(
|
|
101
|
-
bigeye_conf: str = global_options.bigeye_conf,
|
|
102
118
|
config_file: str = global_options.config_file,
|
|
103
119
|
workspace: str = global_options.workspace,
|
|
104
120
|
setting_key: str = typer.Argument(
|
|
105
121
|
None
|
|
106
|
-
,help="The name of the configuration setting."
|
|
122
|
+
, help="The name of the configuration setting."
|
|
107
123
|
),
|
|
108
124
|
setting_value: str = typer.Argument(
|
|
109
125
|
None
|
|
110
|
-
,help="The value of the configuration setting."
|
|
126
|
+
, help="The value of the configuration setting."
|
|
111
127
|
)
|
|
112
128
|
):
|
|
113
129
|
"""
|
|
@@ -124,18 +140,17 @@ def set(
|
|
|
124
140
|
else:
|
|
125
141
|
raise typer.BadParameter(
|
|
126
142
|
message=f"No configuration setting named {setting_key} available to modify. "
|
|
127
|
-
|
|
143
|
+
f"Try one of the following: {str.join(', ', config_settings)}"
|
|
128
144
|
)
|
|
129
145
|
|
|
130
146
|
|
|
131
147
|
@app.command()
|
|
132
148
|
def get(
|
|
133
|
-
bigeye_conf: str = global_options.bigeye_conf,
|
|
134
149
|
config_file: str = global_options.config_file,
|
|
135
150
|
workspace: str = global_options.workspace,
|
|
136
151
|
setting_key: str = typer.Argument(
|
|
137
|
-
|
|
138
|
-
|
|
152
|
+
None
|
|
153
|
+
, help="The name of the configuration setting."
|
|
139
154
|
)
|
|
140
155
|
):
|
|
141
156
|
"""
|
|
@@ -147,7 +162,7 @@ def get(
|
|
|
147
162
|
config_file=config_file,
|
|
148
163
|
setting=setting_key,
|
|
149
164
|
workspace=workspace)
|
|
150
|
-
|
|
165
|
+
|
|
151
166
|
table = Table()
|
|
152
167
|
table.add_column("Workspace", justify="right", style="cyan", no_wrap=True)
|
|
153
168
|
table.add_column("Key", style="magenta")
|
|
@@ -157,15 +172,14 @@ def get(
|
|
|
157
172
|
else:
|
|
158
173
|
raise typer.BadParameter(
|
|
159
174
|
message=f"No configuration setting named {setting_key} available to retrieve. "
|
|
160
|
-
|
|
175
|
+
f"Try one of the following: {str.join(', ', config_settings)}"
|
|
161
176
|
)
|
|
162
177
|
|
|
163
178
|
|
|
164
179
|
@app.command()
|
|
165
180
|
def list(
|
|
166
181
|
bigeye_conf: str = global_options.bigeye_conf,
|
|
167
|
-
config_file: str = global_options.config_file
|
|
168
|
-
workspace: str = global_options.workspace,
|
|
182
|
+
config_file: str = global_options.config_file
|
|
169
183
|
):
|
|
170
184
|
"""
|
|
171
185
|
List all configured workspaces.
|
|
@@ -197,6 +211,6 @@ def list(
|
|
|
197
211
|
cred_type = 'Api Key'
|
|
198
212
|
else:
|
|
199
213
|
cred_type = 'Default'
|
|
200
|
-
table.add_row(key,value.get('workspace_id'),cred_type)
|
|
214
|
+
table.add_row(key, value.get('workspace_id'), cred_type)
|
|
201
215
|
|
|
202
216
|
print(table)
|
|
@@ -4,9 +4,13 @@ import os
|
|
|
4
4
|
from typing import List, Dict
|
|
5
5
|
import typer
|
|
6
6
|
from rich.prompt import Prompt
|
|
7
|
+
from rich import print
|
|
8
|
+
from rich.table import Table
|
|
9
|
+
from rich.text import Text
|
|
7
10
|
|
|
8
11
|
from bigeye_sdk.class_ext.enum_ext import StrEnum
|
|
9
|
-
from bigeye_sdk.client.datawatch_client import DatawatchClient, datawatch_client_factory, get_user_auth
|
|
12
|
+
from bigeye_sdk.client.datawatch_client import DatawatchClient, datawatch_client_factory, get_user_auth, \
|
|
13
|
+
get_all_workspaces_for_login, get_allowed_emails_for_workspace
|
|
10
14
|
from bigeye_sdk.functions.metric_functions import get_file_name_for_metric
|
|
11
15
|
from bigeye_sdk.functions.file_functs import create_subdir_if_not_exists, serialize_listdict_to_json_file, \
|
|
12
16
|
write_to_file, serialize_list_to_json_file
|
|
@@ -15,7 +19,8 @@ from bigeye_sdk.log import get_logger
|
|
|
15
19
|
from bigeye_sdk.authentication.api_authentication import ApiAuth
|
|
16
20
|
from bigeye_sdk.authentication.config import Config, WorkspaceConfig
|
|
17
21
|
from bigeye_sdk.exceptions.exceptions import WorkspaceNotSetException, ConfigNotFoundException
|
|
18
|
-
from bigeye_sdk.generated.com.bigeye.models.generated import MetricInfoList, Table, Issue, MetricTemplate
|
|
22
|
+
from bigeye_sdk.generated.com.bigeye.models.generated import MetricInfoList, Table, Issue, MetricTemplate, \
|
|
23
|
+
WorkspaceIdNameAndRole
|
|
19
24
|
from bigeye_sdk.model.protobuf_extensions import MetricDebugQueries
|
|
20
25
|
|
|
21
26
|
log = get_logger(__file__)
|
|
@@ -65,8 +70,7 @@ def cli_client_factory(auth_file: str = None, config_file: str = None, workspace
|
|
|
65
70
|
else:
|
|
66
71
|
auth = ApiAuth.load(auth_file=auth_file, workspace=workspace)
|
|
67
72
|
|
|
68
|
-
|
|
69
|
-
# Attempt to get workspace configuration. If no config created yet, then throw an error
|
|
73
|
+
# Attempt to get workspace configuration. If no config created yet, then throw an error
|
|
70
74
|
# and have the user run the bigeye configure command.
|
|
71
75
|
try:
|
|
72
76
|
workspace_config = WorkspaceConfig(**config[workspace])
|
|
@@ -214,3 +218,60 @@ def run_enum_menu(enum_clz: enum.EnumMeta, default: StrEnum) -> StrEnum:
|
|
|
214
218
|
typer.echo(f"Invalid Choice.")
|
|
215
219
|
|
|
216
220
|
return valid_types[user_chosen_type_ix]
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def get_workspaces_for_user(cred: ApiAuth, workspace: str, use_default_credential: bool) -> dict:
|
|
224
|
+
# Only prompt user for workspace ID if they have access to multiple workspaces
|
|
225
|
+
accessible_workspaces: List[WorkspaceIdNameAndRole] = get_user_auth(auth=cred).workspaces
|
|
226
|
+
if len(accessible_workspaces) > 1:
|
|
227
|
+
print(Text(text='\n** WORKSPACE OPTIONS **', style='bold green'))
|
|
228
|
+
for wk in accessible_workspaces:
|
|
229
|
+
print(f'{wk.name} - {wk.id}')
|
|
230
|
+
required_config = {
|
|
231
|
+
"workspace_id": Prompt.ask(f"Enter Bigeye workspace ID for desired {workspace} configuration",
|
|
232
|
+
choices=[str(w.id) for w in accessible_workspaces]),
|
|
233
|
+
"use_default_credential": use_default_credential
|
|
234
|
+
}
|
|
235
|
+
elif len(accessible_workspaces) == 1:
|
|
236
|
+
required_config = {
|
|
237
|
+
"workspace_id": str(accessible_workspaces[0].id),
|
|
238
|
+
"use_default_credential": use_default_credential
|
|
239
|
+
}
|
|
240
|
+
else:
|
|
241
|
+
raise WorkspaceNotSetException(f'No workspace access detected. Please check with your Bigeye '
|
|
242
|
+
'administrators to obtain access to a workspace.')
|
|
243
|
+
|
|
244
|
+
return required_config
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
def verify_email_access_for_workspace(cred: ApiAuth, workspace_id: int, bigeye_username: str) -> int:
|
|
248
|
+
no_access = f"\nBigeye user {bigeye_username} does not have access to workspace ID {workspace_id}."
|
|
249
|
+
please_verify = "Please verify you have access or choose another ID from the list above."
|
|
250
|
+
workspace_emails = get_allowed_emails_for_workspace(cred=cred, workspace_id=workspace_id)
|
|
251
|
+
while bigeye_username.lower() not in workspace_emails:
|
|
252
|
+
print(Text(text=f"{no_access}\n{please_verify}", style='bold yellow'))
|
|
253
|
+
workspace_id = Prompt.ask(f"Enter Bigeye workspace ID")
|
|
254
|
+
workspace_emails = get_allowed_emails_for_workspace(cred=cred, workspace_id=workspace_id)
|
|
255
|
+
return workspace_id
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def get_workspace_id_for_user(
|
|
259
|
+
cred: ApiAuth, workspace: str, use_default_credential: bool, bigeye_username: str
|
|
260
|
+
) -> dict:
|
|
261
|
+
all_workspaces = get_all_workspaces_for_login(cred=cred)
|
|
262
|
+
if not all_workspaces:
|
|
263
|
+
raise WorkspaceNotSetException(f'No workspace access detected. Please check with your Bigeye '
|
|
264
|
+
'administrators to obtain access to a workspace.')
|
|
265
|
+
print(
|
|
266
|
+
Text(text='\n** WORKSPACE OPTIONS **\nNOTE: You may not have access to some listed below', style='bold green')
|
|
267
|
+
)
|
|
268
|
+
for wk in all_workspaces:
|
|
269
|
+
print(f'{wk.name} - {wk.id}')
|
|
270
|
+
|
|
271
|
+
workspace_id = Prompt.ask(f"Enter Bigeye workspace ID for desired {workspace} configuration",
|
|
272
|
+
choices=[str(w.id) for w in all_workspaces])
|
|
273
|
+
workspace_id = verify_email_access_for_workspace(cred=cred, workspace_id=workspace_id, bigeye_username=bigeye_username)
|
|
274
|
+
return {
|
|
275
|
+
"workspace_id": workspace_id,
|
|
276
|
+
"use_default_credential": use_default_credential
|
|
277
|
+
}
|
|
@@ -53,10 +53,10 @@ def get_issues(
|
|
|
53
53
|
, help="File to write the failed metric configurations to.")
|
|
54
54
|
):
|
|
55
55
|
"""Gets issues and writes info to files."""
|
|
56
|
-
client = cli_client_factory(bigeye_conf,config_file,workspace)
|
|
56
|
+
client = cli_client_factory(bigeye_conf, config_file, workspace)
|
|
57
57
|
|
|
58
58
|
issues = client.get_issues(warehouse_ids=warehouse_ids,
|
|
59
|
-
|
|
59
|
+
schema_names=schemas,
|
|
60
60
|
metric_ids=metric_ids,
|
|
61
61
|
collection_ids=collection_ids,
|
|
62
62
|
issue_ids=issue_ids)
|
|
@@ -96,7 +96,7 @@ def update_issue(
|
|
|
96
96
|
, help="Used to train Bigeye when closing an issue. Options are TRUE_POSITIVE, FALSE_POSITIVE, EXPECTED.")
|
|
97
97
|
):
|
|
98
98
|
"""Updates an issue in Bigeye and returns the Issue object from the protobuff."""
|
|
99
|
-
client = cli_client_factory(bigeye_conf,config_file,workspace)
|
|
99
|
+
client = cli_client_factory(bigeye_conf, config_file, workspace)
|
|
100
100
|
|
|
101
101
|
client.update_issue(issue_id=issue_id,
|
|
102
102
|
issue_status=issue_status,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "bigeye-cli"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.65"
|
|
4
4
|
description = "Bigeye CLI offers developer tools for maintaining your developer workspace."
|
|
5
5
|
license = "Proprietary"
|
|
6
6
|
authors = ["Bigeye <support@bigeye.com>"]
|
|
@@ -29,7 +29,7 @@ poethepoet = "^0.24.3"
|
|
|
29
29
|
|
|
30
30
|
[tool.poe.tasks]
|
|
31
31
|
pre_build = []
|
|
32
|
-
pre_publish = ["clean"]
|
|
32
|
+
pre_publish = ["clean", "docgen"]
|
|
33
33
|
post_publish = ["clean"]
|
|
34
34
|
|
|
35
35
|
[tool.poe.poetry_hooks]
|
|
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
|