databricks-cli/cmd/bundle/generate
Pieter Noordhuis 1896b09350
Add bundle generate variant for dashboards (#1847)
## Changes

This change adds the `databricks bundle generate dashboard` command.

The command requires one of three flags:
* `--existing-id` to generate configuration for an existing dashboard by
its ID.
* `--existing-path` to generate configuration for an existing dashboard
by its path in the workspace file system.
* `--resource` to generate the `.lvdash.json` dashboard file for a
dashboard that's already defined in the bundle. This option does not
impact the YAML configuration.

A typical workflow could look like this:
1. Use the command with `--existing-id` or `--existing-path` for a
starting point
2. Run `bundle deploy` to deploy a copy of the dashboard
3. Run `bundle open` to open this copy in your browser
4. Navigate to the draft mode and make modifications
5. Run `bundle generate dashboard` with `--resource` to update the local
`.lvdash.json` file with the remote modifications

## Tests

* Unit tests.
* Manual walkthrough as documented in the [Dashboard for NYC Taxi Trip
Analysis
example](https://github.com/databricks/bundle-examples/tree/main/knowledge_base/dashboard_nyc_taxi).
2024-10-29 11:51:59 +00:00
..
dashboard.go Add bundle generate variant for dashboards (#1847) 2024-10-29 11:51:59 +00:00
dashboard_test.go Add bundle generate variant for dashboards (#1847) 2024-10-29 11:51:59 +00:00
generate_test.go Rename `RootPath` -> `BundleRootPath` (#1792) 2024-09-27 10:03:05 +00:00
job.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
pipeline.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
utils.go Added `bundle generate pipeline` command (#1139) 2024-01-25 11:35:14 +00:00