dbt-databricks
dbt-databricks copied to clipboard
fix: Serverless Python model environment version configuration (#1277)
Resolves #1277
Description
- Replace deprecated 'client' field with 'environment_version' in environment spec for serverless Python models
- Add JobEnvironment SDK object conversion in api_client.py to fix 'dict object has no attribute as_dict' error
- Enable TestServerlessClusterWithEnvironment functional test (was previously skipped as 'not available in Databricks yet')
- Add unit tests for environment_version usage and user-provided environments override behavior
- Users can now specify custom environment versions via python_job_config.environments
Checklist
- [x] I have run this code in development and it appears to resolve the stated issue
- [x] This PR includes tests, or tests are not required/relevant for this PR
- [ ] I have updated the
CHANGELOG.mdand added information about my change to the "dbt-databricks next" section.
Coverage report
This report was generated by python-coverage-comment-action
Click to see where and how coverage changed
File Statements Missing Coverage Coverage
(new stmts)Lines missing
dbt/adapters/databricks
api_client.py
536
dbt/adapters/databricks/python_models
python_submissions.py
Project Total