Skip to content

Commit

Permalink
Added more docs for CLI router (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
nfx authored Jan 27, 2024
1 parent 9938b77 commit 1f824bd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- FOR CONTRIBUTORS: Edit this file in Visual Studio Code with the recommended extensions, so that we update the table of contents automatically -->
Databricks Labs Blueprint
---

Expand Down Expand Up @@ -43,6 +44,8 @@ Baseline for Databricks Labs projects written in Python. Sources are validated w
- [Application Name Detection](#application-name-detection)
- [Publishing Wheels to Databricks Workspace](#publishing-wheels-to-databricks-workspace)
- [Databricks CLI's `databricks labs ...` Router](#databricks-clis-databricks-labs--router)
- [Account-level Commands](#account-level-commands)
- [Integration with Databricks Connect](#integration-with-databricks-connect)
- [Starting New Projects](#starting-new-projects)
- [Notable Downstream Projects](#notable-downstream-projects)
- [Project Support](#project-support)
Expand Down Expand Up @@ -846,6 +849,10 @@ if "__main__" == __name__:
app()
```

[[back to top](#databricks-labs-blueprint)]

### Account-level Commands

As you may have noticed, there were only workspace-level commands, but you can also nave native account-level command support. You need to specify the `is_account` property when declaring it in `labs.yml` file:

```yaml
Expand All @@ -868,7 +875,12 @@ def workspaces(a: AccountClient):
logger.info(f"Workspace: {ws.workspace_name} ({ws.workspace_id})")
```

[[back to top](#databricks-labs-blueprint)]

### Integration with Databricks Connect

Invoking Sparksession using Databricks Connect

```python
from databricks.sdk import WorkspaceClient
from databricks.connect import DatabricksSession
Expand Down

0 comments on commit 1f824bd

Please sign in to comment.