Skip to content

Commit

Permalink
Feat/1406 bumps duckdb 0.10 (#1407)
Browse files Browse the repository at this point in the history
* bumps duckdb to 0.10.x

* updates dbt support to 1.8
  • Loading branch information
rudolfix authored May 25, 2024
1 parent 5d2d1ec commit 67ccacd
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 124 deletions.
2 changes: 1 addition & 1 deletion dlt/helpers/dbt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from dlt.helpers.dbt.runner import create_runner, DBTPackageRunner

DEFAULT_DBT_VERSION = ">=1.1,<1.6"
DEFAULT_DBT_VERSION = ">=1.5,<1.9"

# a map of destination names to dbt package names in case they don't match the pure destination name
DBT_DESTINATION_MAP = {
Expand Down
12 changes: 0 additions & 12 deletions dlt/helpers/dbt/dbt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# https://stackoverflow.com/questions/48619517/call-a-click-command-from-code

import dbt.logger
from dbt.events import functions
from dbt.contracts import results as dbt_results
except ModuleNotFoundError:
raise MissingDependencyException("DBT Core", ["dbt-core"])
Expand Down Expand Up @@ -56,17 +55,6 @@ def set_path_wrapper(self: dbt.logger.LogManager, path: str) -> None:
self._file_handler.set_path(path)
_DBT_LOGGER_INITIALIZED = True

# def setup_event_logger_wrapper(log_path: str, level_override:str = None) -> None:
# global _DBT_LOGGER_INITIALIZED

# if not _DBT_LOGGER_INITIALIZED:
# functions.setup_event_logger(log_path, level.lower())
# # force log level as file is debug only
# # functions.this.FILE_LOG.setLevel(level)
# # functions.this.FILE_LOG.handlers[0].setLevel(level)
# _DBT_LOGGER_INITIALIZED = True

# dbt.main.setup_event_logger = setup_event_logger_wrapper
dbt.logger.LogManager.set_path = set_path_wrapper # type: ignore

globs = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ def resource(url: str):
# dlt bigquery custom destination
# we can use the dlt provided credentials class
# to retrieve the gcp credentials from the secrets
@dlt.destination(name="bigquery", loader_file_format="parquet", batch_size=0, naming_convention="snake_case")
@dlt.destination(
name="bigquery", loader_file_format="parquet", batch_size=0, naming_convention="snake_case"
)
def bigquery_insert(
items, table=BIGQUERY_TABLE_ID, credentials: GcpServiceAccountCredentials = dlt.secrets.value
) -> None:
Expand Down
Loading

0 comments on commit 67ccacd

Please sign in to comment.