Skip to main content

The Hive adapter plugin for dbt

Project description

dbt-hive

The dbt-hive adapter allows you to use dbt along with Apache Hive and Cloudera Data Platform

Getting started

Credits

The initial adapter code was developed by bachng2017 who agreed to transfer the ownership and continue active development. This code base is now being actively developed and maintained by Cloudera.

Requirements

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.10.* impyla >= 0.18

Install

pip3 install --user dbt-hive

Sample profile

demo_project:
  target: dev
  outputs:
  dev:
    type: hive
    auth_type: LDAP
    user: [username]
    password: [password]
    schema: [schema]
    host: [hive-meta-store-host]
    port: 443
    http_path: [http-path]
    thread: 1

Supported features

Name Supported Iceberg
Materialization: View Yes N/A
Materialization: Table Yes Yes
Materialization: Table with Partitions Yes Yes
Materialization: Incremental - Append Yes Yes
Materialization: Incremental - Append with Partitions Yes Yes
Materialization: Incremental - Insert+Overwrite with Partitions Yes No
Materialization: Incremental - Merge Yes Yes
Materialization: Incremental - Merge with Partitions No Yes*
Materialization: Ephemeral No No
Seeds Yes Yes
Tests Yes Yes
Snapshots No No
Documentation Yes No
Authentication: LDAP Yes Yes
Authentication: Kerberos Yes Yes

Incremental

Incremental models are explained in dbt documentation. This section covered the details about the incremental strategy supported by the dbt-hive.

Strategy ACID Table Iceberg Table
Incremental Full-Refresh Yes Yes
Incremental Append Yes Yes
Incremental Append with Partitions Yes Yes
Incremental Insert Overwrite Not recommended without Partitions* Not recommended without Partitions*
Incremental Insert Overwrite with Partitions Yes No
Incremental Merge Yes Yes* (only v2)
Incremental Merge with Partitions No* Yes* (only v2)

Note*:

  1. Incremental Insert overwrite without the partition columns results into completely overwriting the full table and may result in the data-loss. Hence it is not recommended to used. This can happen for Hive ACID, Iceberg v1 & v2 tables.
  2. Incremental Merge for iceberg v1 table is not supported because Iceberg v1 tables are not transactional.
  3. Incremental Merge with partition columns is not supported because Hive ACID tables doesn't support updating values of partition columns.

Support for On-Schema Change strategy in dbt-hive:

Strategy ACID Table Iceberg Table
ignore (default) Supported Supported
fail Supported Supported
append_new_columns Adds new columns Adds new columns
sync_all_columns Adds new columns and updates datatypes but doesn't remove existing columns Adds new columns, updates datatypes and removes existing columns

Tests Coverage

Functional Tests

Name Base Iceberg
Materialization: View Yes N/A
Materialization: Table Yes Yes
Materialization: Table with Partitions Yes Yes
Materialization: Incremental - Append Yes Yes
Materialization: Incremental - Append with Partitions Yes Yes
Materialization: Incremental - Insert+Overwrite with Partitions Yes No
Materialization: Incremental - Merge Yes Yes
Materialization: Ephemeral No No
Seeds Yes Yes
Tests Yes Yes
Snapshots No No
Documentation Yes No
Authentication: LDAP Yes Yes
Authentication: Kerberos Yes Yes

Note: Kerberos is only qualified on Unix platform.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt_hive-1.10.0.tar.gz (34.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_hive-1.10.0-py3-none-any.whl (54.8 kB view details)

Uploaded Python 3

File details

Details for the file dbt_hive-1.10.0.tar.gz.

File metadata

  • Download URL: dbt_hive-1.10.0.tar.gz
  • Upload date:
  • Size: 34.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.13

File hashes

Hashes for dbt_hive-1.10.0.tar.gz
Algorithm Hash digest
SHA256 fb63332b5dd3349aad4477d33540c779122314a6b43f37f27a68df8727035e9f
MD5 990da912438e90aa67dada54ca3c1051
BLAKE2b-256 1b74d9c80a8121c6d617337177e977722864267c4d092fdbe934691c0831f9dd

See more details on using hashes here.

File details

Details for the file dbt_hive-1.10.0-py3-none-any.whl.

File metadata

  • Download URL: dbt_hive-1.10.0-py3-none-any.whl
  • Upload date:
  • Size: 54.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.13

File hashes

Hashes for dbt_hive-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc6f086e5b62179736eebadd89ee63c84987d2a05ce32c35a5755492844fde6f
MD5 ff860cb1d9d6fc4bbbbc82747f82ff55
BLAKE2b-256 46d780ef427c8aff90b06baf87e6ad0e0f36493c610a572bf7c378682e2b269e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page