Closed kdazzle closed 1 month ago
@kdazzle can you rebase/target your PR against 1.9.latest? I have a couple of things that I need to wrap up, but I'm planning to take some version of this into the 1.9 release.
Looks like some syntax you're using does not work with python 3.8 based on unit test failures.
Going to pull/push to origin to run the existing functional tests. We should add one for this new code. Let me know if you need help with that.
Going to merge in 1.9.latest changes (which is basically only 1.8 changes), ensure tests still pass, then merge.
WIP - Stubs out implementation for #756
This pretty much implements what a workflow job submission type would look like, though I'm sure I'm missing something. Tests haven't been added yet.
Sample
Outside of the new submission type, models are the same. Here is what one could look like:
The config for a model could look like (forgive my jsonification...yaml data structures still freak me out):
Explanation
For all of the dbt configs that I added (in addition to the Databricks API attributes), I tried to roughly mediate between the dbt convention of requiring minimal configuration, but also allowing for the full flexibility of the Databricks API. Attribute names were trying to split the difference between the Databricks API and the dbt API. Happy to change the approach for anything.
existing_job_id
in case users want to reuse an existing workflow. If noname
is provided in this config, it will get renamed to the default job name (currentlyf"dbt__{self.database}-{self.schema}-{self.identifier}"
)existing_job_id
is also providedtask_a
- configurable inadditional_task_settings
new_cluster
orexisting_cluster_id
. Leaving blank is serverlesspost_hook
might be a misnomer, because you could technically set the dbt model to depend on one of these tasks, making it also a pre hookgrants
- allow for permissions to be set on the workflow so that additional users/teams can run the job ad hoc if needed (for initial runs/backfills, etc). The owner is the user/service principal that deployed, and the format needs to follow the Databricks API where you specify whether the user is a user, group, or SP.additional_task_settings
to add to/override the default dbt model taskTodo:
all_purpose_cluster
attribute, similar tojob_cluster_config
?Description
Checklist
CHANGELOG.md
and added information about my change to the "dbt-databricks next" section.