Skip to content

Conversation

@ueshin
Copy link
Contributor

@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.

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
Contributor 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
Contributor 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.

2 participants