Skip to content
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

Follow "More flexible cluster configuration". #194

Merged
merged 8 commits into from
Sep 28, 2022

Conversation

ueshin
Copy link
Collaborator

@ueshin ueshin commented Sep 26, 2022

Description

Follows "More flexible cluster configuration" at dbt-labs/dbt-spark#467.

  • Reuse dbt-spark's implementation
  • Remove the dependency on databricks-cli
  • Internal refactorings

Copy link
Collaborator

@allisonwang-db allisonwang-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Thanks for the refactoring.

dbt/adapters/databricks/python_submissions.py Outdated Show resolved Hide resolved
return self.parsed_model.get(
"cluster_id",
self.credentials.extract_cluster_id(
self.parsed_model.get("http_path", self.credentials.http_path)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we specify an http_path that is different from the one in dbt profiles for a Python model?

Copy link
Collaborator Author

@ueshin ueshin Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the heads-up.
Actually I double-checked it and found there is a mistake. I'll update it.

After the update, yes, we can specify http_path in the Python model config that is different from the one in the profile.

def model(...):
    dbt.config(http_path='...')
    ....

or in dbt_project.yml file:

models:
  - name: my_python_model
    config:
      http_path: ...

@ueshin
Copy link
Collaborator Author

ueshin commented Sep 28, 2022

Thanks! merging.

@ueshin ueshin merged commit dbd58fb into databricks:main Sep 28, 2022
@ueshin ueshin deleted the job_cluster_run branch September 28, 2022 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants