How to generate a Databricks Asset Bundle easily?

The easiest way to generate the YAML for the Databricks Asset Bundles is to use the UI.

First, you need to create your workflow manually, like below with an if-else task:

Next, click on the menu and choose "Edit as YAML":

The editor will return the resource definition that you can use as the Databricks Asset Bundle input: