Skip to content

DBT-822 Support dbt-core 1.10.0 for dbt-hive #165

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: main
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ This code base is now being actively developed and maintained by Cloudera.

### Requirements

Current version of dbt-hive uses dbt-core 1.9.*. We are actively working on supporting the next available version of dbt-core.
Current version of dbt-hive 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.*
impyla >= 0.18

### Install
Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/hive/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# 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 @@ -45,7 +45,7 @@ def _get_dbt_core_version():

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

dbt_core_version = _get_dbt_core_version()
Expand Down
48 changes: 36 additions & 12 deletions tests/functional/adapter/test_concurrency.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,47 @@
from collections import Counter

import pytest
from dbt.tests.util import run_dbt, check_relations_equal, rm_file, write_file

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

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


class TestConcurrencyHive(BaseConcurrency):
def test_concurrency_hive(self, project):
def test_concurrency(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"])
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`")

rm_file(project.project_root, "seeds", "seed.csv")
write_file(seeds__update_csv, 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"])

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`")

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