Skip to content

Set upper bound for databricks-sql-connector instead of Python #154

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

Merged
merged 2 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
- Update `SparkColumn.numeric_type` to return `decimal` instead of `numeric`, since SparkSQL exclusively supports the former ([dbt-labs/dbt-spark#380](https://github.com/dbt-labs/dbt-spark/pull/380))
- Make minimal changes to support dbt Core incremental materialization refactor ([dbt-labs/dbt-spark#402](https://github.com/dbt-labs/dbt-spark/issue/402), [dbt-labs/dbt-spark#394](httpe://github.com/dbt-labs/dbt-spark/pull/394), [#136](https://github.com/databricks/dbt-databricks/pull/136))
- Add new basic tests `TestDocsGenerateDatabricks` and `TestDocsGenReferencesDatabricks` ([#134](https://github.com/databricks/dbt-databricks/pull/134))
- Set upper bound for `databricks-sql-connector` when Python 3.10 ([#154](https://github.com/databricks/dbt-databricks/pull/154))
- Note that `databricks-sql-connector` does not officially support Python 3.10 yet.

### Contributors
- [@grindheim](https://github.com/grindheim) ([dbt-labs/dbt-spark#287](https://github.com/dbt-labs/dbt-spark/pull/287/))
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,7 @@ These following quick starts will get you up and running with the `dbt-databrick

### Compatibility

The `dbt-databricks` adapter has been tested against `Databricks SQL` and `Databricks runtime releases 9.1 LTS` and later.
The `dbt-databricks` adapter has been tested:

- with Python >=3.7, <3.10.
- against `Databricks SQL` and `Databricks runtime releases 9.1 LTS` and later.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
databricks-sql-connector>=2.0.2
databricks-sql-connector>=2.0.2; python_version<'3.10'
databricks-sql-connector>=2.0.2,<2.0.3; python_version=='3.10'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need this line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It applies the upper bound only when Python 3.10.

dbt-spark~=1.3.0a1
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def _get_plugin_version():
include_package_data=True,
install_requires=[
"dbt-spark~={}".format(dbt_spark_version),
"databricks-sql-connector>=2.0.2",
"databricks-sql-connector>=2.0.2; python_version<'3.10'",
"databricks-sql-connector>=2.0.2,<2.0.3; python_version=='3.10'",
],
zip_safe=False,
classifiers=[
Expand All @@ -69,5 +70,5 @@ def _get_plugin_version():
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
python_requires=">=3.7,<3.10",
python_requires=">=3.7",
)