diff --git a/install.py b/install.py new file mode 100644 index 00000000..16cfb879 --- /dev/null +++ b/install.py @@ -0,0 +1,3 @@ +import os + +print(f'host is {os.environ["DATABRICKS_HOST"]}') diff --git a/labs.yml b/labs.yml new file mode 100644 index 00000000..49758bbf --- /dev/null +++ b/labs.yml @@ -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 \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 00000000..32718997 --- /dev/null +++ b/main.py @@ -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}') \ No newline at end of file