-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See databricks/cli#637 for more context
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import os | ||
|
||
print(f'host is {os.environ["DATABRICKS_HOST"]}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: dbx | ||
context: workspace | ||
description: Databricks CLI extensions | ||
hooks: | ||
install: install.py | ||
entrypoint: main.py | ||
commands: | ||
- name: foo | ||
description: foo command | ||
flags: | ||
- name: first | ||
description: first flag description | ||
- name: second | ||
description: second flag description | ||
- name: bar | ||
description: bar command | ||
flags: | ||
- name: first | ||
description: first flag description | ||
- name: second | ||
description: second flag description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import os, sys, json | ||
|
||
print(f'host is {os.environ["DATABRICKS_HOST"]}') | ||
|
||
payload = json.loads(sys.argv[1]) | ||
print(f'[{payload["command"]}]: flags are {payload["flags"]}') | ||
|
||
answer = input('What is your name? ') | ||
|
||
print(f'got answer: {answer}') | ||
|
||
answer = input('Preferences? ') | ||
|
||
print(f'got answer: {answer}') |