Repository navigation
Add AI/BI dashboard example #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
119bc3f
Initial commit
pietern 120c9d4
Reformat
pietern 844bc5f
Rephrase
pietern ce5707c
Short
pietern 8136ecd
Mention name
pietern 0464fa8
Reorder datasets
pietern f0e1401
Reorder datasets
pietern 7707969
Order keys alphabetically
pietern a634317
Expand README
pietern 964b365
Revert host change
pietern 7e46a29
Update knowledge_base/dashboard_nyc_taxi/README.md
pietern 261dd43
Update knowledge_base/dashboard_nyc_taxi/README.md
pietern a72b358
Update knowledge_base/dashboard_nyc_taxi/README.md
pietern 6e75e31
Update knowledge_base/dashboard_nyc_taxi/README.md
pietern e99f184
Update knowledge_base/dashboard_nyc_taxi/README.md
pietern c7224b2
Update knowledge_base/dashboard_nyc_taxi/README.md
pietern 37ed158
Update knowledge_base/dashboard_nyc_taxi/README.md
pietern a275af7
Update knowledge_base/dashboard_nyc_taxi/README.md
pietern 7737efb
Update knowledge_base/dashboard_nyc_taxi/README.md
pietern File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,46 @@ | ||
| # Dashboard for NYC Taxi Trip Analysis | ||
|
|
||
| This example demonstrates how to define an AI/BI dashboard in a Databricks Asset Bundle. | ||
|
|
||
| It includes and deploys the sample __NYC Taxi Trip Analysis__ dashboard to a Databricks workspace. | ||
|
|
||
| For more information about AI/BI dashboards, please refer to the [documentation](https://docs.databricks.com/dashboards/index.html). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| * Databricks CLI v0.232.0 or above | ||
|
|
||
| ## Usage | ||
|
|
||
| Modify `databricks.yml`: | ||
| * Update the `host` field under `workspace` to the Databricks workspace to deploy to. | ||
| * Update the `warehouse` field under `warehouse_id` to the name of the SQL warehouse to use. | ||
|
|
||
| Run `databricks bundle deploy` to deploy the dashboard. | ||
|
|
||
| Run `databricks bundle open` to navigate to the deployed dashboard in your browser. Alternatively, run `databricks bundle summary` to display its URL. | ||
|
|
||
| ### Visual modification | ||
|
|
||
| You can use the Databricks UI to modify the dashboard, but any modifications made through the UI will not be applied to the bundle `.lvdash.json` file unless you explicitly update it. | ||
|
|
||
| To update the local bundle `.lvdash.json` file, run: | ||
|
|
||
| ```sh | ||
| databricks bundle generate dashboard --resource nyc_taxi_trip_analysis --force | ||
| ``` | ||
|
|
||
| To continuously poll and retrieve the updated `.lvdash.json` file when it changes, run: | ||
|
|
||
| ```sh | ||
| databricks bundle generate dashboard --resource nyc_taxi_trip_analysis --force --watch | ||
| ``` | ||
|
|
||
| Any remote modifications of a dashboard are noticed by the `deploy` command and require | ||
| you to acknowledge that remote changes can be overwritten by local changes. | ||
| It is therefore recommended to run the `generate` command before running the `deploy` command. | ||
| Otherwise, you may lose your remote changes. | ||
|
|
||
| ### Manual modification | ||
|
|
||
| You can modify the `.lvdash.json` file directly and redeploy to observe your changes. | ||
This file contains hidden or 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,20 @@ | ||
| bundle: | ||
| name: dashboard_nyc_taxi | ||
|
|
||
| include: | ||
| - resources/*.yml | ||
|
|
||
| variables: | ||
| # The "warehouse_id" variable is used to reference the warehouse used by the dashboard. | ||
| warehouse_id: | ||
| lookup: | ||
| # Replace this with the name of your SQL warehouse. | ||
| warehouse: "Shared Unity Catalog Severless" | ||
|
|
||
| workspace: | ||
| host: https://myworkspace.databricks.com | ||
|
|
||
| targets: | ||
| dev: | ||
| default: true | ||
| mode: development |
22 changes: 22 additions & 0 deletions
22
knowledge_base/dashboard_nyc_taxi/resources/nyc_taxi_trip_analysis.dashboard.yml
This file contains hidden or 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 @@ | ||
| resources: | ||
| dashboards: | ||
| nyc_taxi_trip_analysis: | ||
| display_name: "NYC Taxi Trip Analysis" | ||
| file_path: ../src/nyc_taxi_trip_analysis.lvdash.json | ||
| warehouse_id: ${var.warehouse_id} | ||
|
|
||
| # If "embed_credentials" is set to true, the bundle deployment identity's credentials | ||
| # are used to execute queries for all dashboard viewers. | ||
| # If it is set to false, each viewer's own credentials will be used instead. | ||
| # | ||
| # It defaults to false. | ||
| # | ||
| # embed_credentials: false | ||
|
|
||
| # The "parent_path" field can be configured to place the dashboard in a | ||
| # non-standard folder in the workspace. | ||
| # | ||
| # It defaults to "${workspace.resource_path}", which is located | ||
| # under the bundle deployment root. | ||
| # | ||
| # parent_path: ${workspace.resource_path} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the steps in here be numbered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could but then should apply it in the other examples in the knowledge base as well.
What do you typically convey with numbering over plain enumeration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can fix this in a separate PR if needed.