Skip to content

DBT-823 Support dbt-core 1.10.0 for dbt-impala #217

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DEFAULT_GOAL := help
PYTHON_VERSION ?= py38
PYTHON_VERSION ?= py311

# Define the name of the virtual environment directory
VENV ?= .venv-dbt-impala
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ The `dbt-impala` adapter allows you to use [dbt](https://www.getdbt.com/) along

### Requirements

Current version of dbt-impala uses dbt-core 1.9.*. We are actively working on supporting the next available version of dbt-core.
Current version of dbt-impala uses dbt-core 1.10.*. We are actively working on supporting the next available version of dbt-core.

Python >= 3.9
dbt-core == 1.9.*
dbt-core == 1.10.*

For development/testing or contribution to the dbt-impala, please follow [Contributing](CONTRIBUTING.md) guidelines.

Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/impala/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

version = "1.9.0"
version = "1.10.0"
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dbt-tests-adapter==1.9.*
dbt-tests-adapter==1.10.*
pre-commit~=2.21;python_version=="3.7"
pre-commit~=3.2;python_version>="3.8"
pytest
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _get_dbt_core_version():

package_name = "dbt-impala"
# make sure this always matches dbt/adapters/dbt_impala/__version__.py
package_version = "1.9.0"
package_version = "1.10.0"
description = """The Impala adapter plugin for dbt"""

dbt_core_version = _get_dbt_core_version()
Expand Down
40 changes: 16 additions & 24 deletions tests/functional/adapter/test_concurrency.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
from collections import Counter

import pytest

from dbt.artifacts.schemas.results import RunStatus
from dbt.tests.util import (
run_dbt,
check_relations_equal,
check_table_does_not_exist,
rm_file,
run_dbt,
write_file,
check_table_does_not_exist,
run_dbt_and_capture,
)

from dbt.tests.adapter.concurrency.test_concurrency import BaseConcurrency, seeds__update_csv


class TestConcurrencyImpala(BaseConcurrency):
def test_concurrency_impala(self, project):
run_dbt(["seed", "--select", "seed"])
results = run_dbt(["run"], expect_pass=False)
assert len(results) == 7
check_relations_equal(project.adapter, ["SEED", "VIEW_MODEL"])
check_relations_equal(project.adapter, ["SEED", "DEP"])
check_relations_equal(project.adapter, ["SEED", "TABLE_A"])
check_relations_equal(project.adapter, ["SEED", "TABLE_B"])

rm_file(project.project_root, "seeds", "seed.csv")
write_file(seeds__update_csv, project.project_root + "/seeds", "seed.csv")
results = run_dbt(["run"], expect_pass=False)
assert len(results) == 7
check_relations_equal(project.adapter, ["SEED", "VIEW_MODEL"])
check_relations_equal(project.adapter, ["SEED", "DEP"])
check_relations_equal(project.adapter, ["SEED", "TABLE_A"])
check_relations_equal(project.adapter, ["SEED", "TABLE_B"])

def test_concurrency(self, project):
run_dbt(["seed", "--select", "seed"])
results = run_dbt(["run"], expect_pass=False)
Expand All @@ -43,13 +29,19 @@ def test_concurrency(self, project):
rm_file(project.project_root, "seeds", "seed.csv")
write_file(seeds__update_csv, project.project_root, "seeds", "seed.csv")

results, output = run_dbt_and_capture(["run"], expect_pass=False)
assert len(results) == 7
results = run_dbt(["run"], expect_pass=False)

check_relations_equal(project.adapter, ["seed", "view_model"])
check_relations_equal(project.adapter, ["seed", "dep"])
check_relations_equal(project.adapter, ["seed", "table_a"])
check_relations_equal(project.adapter, ["seed", "table_b"])
check_table_does_not_exist(project.adapter, "invalid")
check_table_does_not_exist(project.adapter, "`skip`")

assert "PASS=5 WARN=0 ERROR=1 SKIP=1 TOTAL=7" in output
result_statuses = Counter([result.status for result in results])
expected_statuses = {
RunStatus.Success: 5,
RunStatus.Error: 1,
RunStatus.Skipped: 1,
}
assert result_statuses == expected_statuses