diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a89082969..e4fc66ccc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Check out the repository @@ -173,7 +173,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-12, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/release-prep.yml b/.github/workflows/release-prep.yml index 11af8214d..9cb2c3e19 100644 --- a/.github/workflows/release-prep.yml +++ b/.github/workflows/release-prep.yml @@ -448,7 +448,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Check out the repository diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e228e7d97..fdb195262 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,6 +28,7 @@ repos: - --target-version=py39 - --target-version=py310 - --target-version=py311 + - --target-version=py312 additional_dependencies: [flaky] - repo: https://github.com/pycqa/flake8 diff --git a/README.md b/README.md index 7e95b1fc3..adeb16915 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,13 @@ rm -rf ./.hive-metastore/ rm -rf ./.spark-warehouse/ ``` +#### Additional Configuration for MacOS + +If installing on MacOS, use `homebrew` to install required dependencies. + ```sh + brew install unixodbc + ``` + ### Reporting bugs and contributing code - Want to report a bug or request a feature? Let us know on [Slack](http://slack.getdbt.com/), or open [an issue](https://github.com/fishtown-analytics/dbt-spark/issues/new). diff --git a/dbt/include/spark/macros/adapters.sql b/dbt/include/spark/macros/adapters.sql index 5c1ccd082..688e13723 100644 --- a/dbt/include/spark/macros/adapters.sql +++ b/dbt/include/spark/macros/adapters.sql @@ -391,7 +391,6 @@ {% do return(tmp_relation) %} {% endmacro %} - {% macro spark__alter_column_type(relation, column_name, new_column_type) -%} {% call statement('alter_column_type') %} alter table {{ relation }} alter column {{ column_name }} type {{ new_column_type }}; diff --git a/requirements.txt b/requirements.txt index b32884c43..412630919 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ pyhive[hive_pure_sasl]~=0.7.0 requests>=2.28.1 -pyodbc~=4.0.39 --no-binary pyodbc +pyodbc~=5.1.0 --no-binary pyodbc sqlparams>=3.0.0 thrift>=0.13.0 pyspark>=3.0.0,<4.0.0 diff --git a/setup.py b/setup.py index fd985eba4..9e1fa31e3 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ def _get_plugin_version_dict(): package_version = "1.9.0a1" description = """The Apache Spark adapter plugin for dbt""" -odbc_extras = ["pyodbc~=4.0.39"] +odbc_extras = ["pyodbc~=5.1.0"] pyhive_extras = [ "PyHive[hive_pure_sasl]~=0.7.0", "thrift>=0.11.0,<0.17.0", @@ -87,6 +87,7 @@ def _get_plugin_version_dict(): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], python_requires=">=3.8", )