Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import os

print(f'host is {os.environ["DATABRICKS_HOST"]}')
22 changes: 22 additions & 0 deletions labs.yml
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
14 changes: 14 additions & 0 deletions main.py
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}')