File tree Expand file tree Collapse file tree 14 files changed +280
-72
lines changed
deployment/bind/quality-monitor Expand file tree Collapse file tree 14 files changed +280
-72
lines changed Original file line number Diff line number Diff line change @@ -4,23 +4,3 @@ RecordRequests = true
44Ignore = [
55 ' .databricks' ,
66]
7-
8- [[Server ]]
9- Pattern = " POST /api/2.0/apps"
10-
11- [[Server ]]
12- Pattern = " GET /api/2.0/apps/myapp"
13- Response.Body = '''
14- {
15- "name": "myapp",
16- "description": "",
17- "compute_status": {
18- "state": "ACTIVE",
19- "message": "App compute is active."
20- },
21- "app_status": {
22- "state": "RUNNING",
23- "message": "Application is running."
24- }
25- }
26- '''
Original file line number Diff line number Diff line change 1+ {
2+ "assets_dir" :" /Users/user/databricks_lakehouse_monitoring" ,
3+ "output_schema_name" :" catalog.schema" ,
4+ "snapshot" : {}
5+ }
Original file line number Diff line number Diff line change 11
2+ >>> [CLI] quality-monitors create catalog.schema.table --json @input.json
3+ {
4+ "assets_dir":"/Users/user/databricks_lakehouse_monitoring",
5+ "drift_metrics_table_name":"",
6+ "monitor_version":"",
7+ "output_schema_name":"catalog.schema",
8+ "profile_metrics_table_name":"",
9+ "snapshot": {},
10+ "status":"MONITOR_STATUS_ACTIVE",
11+ "table_name":"catalog.schema.table"
12+ }
13+
214>>> [CLI] bundle deployment bind monitor1 catalog.schema.table
315Updating deployment state...
416Successfully bound quality_monitor with an id 'catalog.schema.table'. Run 'bundle deploy' to deploy changes to your workspace
Original file line number Diff line number Diff line change 1+ trace $CLI quality-monitors create catalog.schema.table --json @input.json
12trace $CLI bundle deployment bind monitor1 "catalog.schema.table"
23trace $CLI bundle deploy
Original file line number Diff line number Diff line change 11Local = true
22Cloud = false
3-
4- [[Server ]]
5- Pattern = " GET /api/2.1/unity-catalog/tables/catalog.schema.table/monitor"
6- Response.Body = '''
7- {
8- "assets_dir":"/Users/user/databricks_lakehouse_monitoring",
9- "dashboard_id":"01f00b1c15de19c7945fa190201813df",
10- "drift_metrics_table_name":"catalog.schema.table_drift_metrics",
11- "monitor_version":"0",
12- "output_schema_name":"catalog.schema",
13- "profile_metrics_table_name":"catalog.schema.table_profile_metrics",
14- "snapshot": {},
15- "status":"MONITOR_STATUS_ACTIVE",
16- "table_name":"catalog.schema.table"
17- }
18- '''
19-
20- [[Server ]]
21- Pattern = " PUT /api/2.1/unity-catalog/tables/users.user.table/monitor"
Original file line number Diff line number Diff line change 11{
2+ "name" : " test-name" ,
23 "description" : " My app description." ,
34 "resources" : [
45 {
Original file line number Diff line number Diff line change 1+ {
2+ "method": "POST",
3+ "path": "/api/2.0/apps",
4+ "body": {
5+ "description": "My app description.",
6+ "name": "test-name",
7+ "resources": [
8+ {
9+ "description": "API key for external service.",
10+ "name": "api-key",
11+ "secret": {
12+ "key": "my-key",
13+ "permission": "READ",
14+ "scope": "my-scope"
15+ }
16+ }
17+ ]
18+ }
19+ }
20+ {
21+ "method": "GET",
22+ "path": "/api/2.0/apps/test-name"
23+ }
124{
225 "method": "PATCH",
326 "path": "/api/2.0/apps/test-name",
427 "body": {
528 "description": "My app description.",
6- "name": "",
29+ "name": "test-name ",
730 "resources": [
831 {
932 "description": "API key for external service.",
Original file line number Diff line number Diff line change 11
2+ === Apps create with correct input
3+ >>> [CLI] apps create --json @input.json
4+ {
5+ "app_status": {
6+ "message":"Application is running.",
7+ "state":"RUNNING"
8+ },
9+ "compute_status": {
10+ "message":"App compute is active.",
11+ "state":"ACTIVE"
12+ },
13+ "description":"My app description.",
14+ "id":"1000",
15+ "name":"test-name",
16+ "resources": [
17+ {
18+ "description":"API key for external service.",
19+ "name":"api-key",
20+ "secret": {
21+ "key":"my-key",
22+ "permission":"READ",
23+ "scope":"my-scope"
24+ }
25+ }
26+ ],
27+ "url":"test-name-123.cloud.databricksapps.com"
28+ }
29+
230=== Apps update with correct input
331>>> [CLI] apps update test-name --json @input.json
432{
533 "app_status": {
634 "message":"Application is running.",
7- "state":"DEPLOYING "
35+ "state":"RUNNING "
836 },
937 "compute_status": {
1038 "message":"App compute is active.",
11- "state":"ERROR "
39+ "state":"ACTIVE "
1240 },
1341 "description":"My app description.",
14- "id":"12345 ",
42+ "id":"1001 ",
1543 "name":"test-name",
1644 "resources": [
1745 {
Original file line number Diff line number Diff line change 1+ title "Apps create with correct input"
2+ trace $CLI apps create --json @input.json
3+
14title "Apps update with correct input"
25trace $CLI apps update test-name --json @input.json
36
Original file line number Diff line number Diff line change 11RecordRequests = true
2-
3- [[Server ]]
4- Pattern = " PATCH /api/2.0/apps/test-name"
5- Response.Body = '''
6- {
7- "name": "test-name",
8- "description": "My app description.",
9- "compute_status": {
10- "state": "ERROR",
11- "message": "App compute is active."
12- },
13- "app_status": {
14- "state": "DEPLOYING",
15- "message": "Application is running."
16- },
17- "url": "test-name-123.cloud.databricksapps.com",
18- "resources": [
19- {
20- "name": "api-key",
21- "description": "API key for external service.",
22- "secret": {
23- "scope": "my-scope",
24- "key": "my-key",
25- "permission": "READ"
26- }
27- }
28- ],
29- "id": "12345"
30- }'''
You can’t perform that action at this time.
0 commit comments