Skip to content

Commit

Permalink
licences headers + release notes added
Browse files Browse the repository at this point in the history
  • Loading branch information
howareyouman committed Nov 18, 2024
1 parent 2a66bdf commit 76c64af
Show file tree
Hide file tree
Showing 19 changed files with 221 additions and 12 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# dbt-dremio MAIN
# dbt-dremio v1.8.0

## Changes

## Dependency

- [#222](https://github.com/dremio/dbt-dremio/issues/222) Upgrade dbt-core to 1.8.8 and dbt-tests-adapter to 1.8.0

## Features

- [#223](https://github.com/dremio/dbt-dremio/issues/224) Implement merge strategy for incremental materializations
- [#229](https://github.com/dremio/dbt-dremio/issues/229) Add max operator to get_relation_last_modified macro
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ dbt is the T in ELT. Organize, cleanse, denormalize, filter, rename, and pre-agg

[Dremio docs for our dbt adapter ](https://github.com/dremio/dbt-dremio/wiki/Using-Materializations-with-Dremio)

## dbt-dremio version 1.7.0

The `dbt-dremio` package contains all of the code enabling dbt to work with [Dremio](https://www.dremio.com/). For more information on using dbt with Dremio, consult [the docs](https://docs.getdbt.com/reference/warehouse-profiles/dremio-profile).

The dbt-dremio package supports both Dremio Cloud and Dremio Software (versions 22.0 and later).

Version 1.7.0 of the dbt-dremio adapter is compatible with dbt-core versions 1.2.0 to 1.7.*.
## dbt-dremio version 1.8.0

Version 1.8.0 of the dbt-dremio adapter is compatible with dbt-core versions 1.8.*.

> Prior to version 1.1.0b, dbt-dremio was created and maintained by [Fabrice Etanchaud](https://github.com/fabrice-etanchaud) on [their GitHub repo](https://github.com/fabrice-etanchaud/dbt-dremio). Code for using Dremio REST APIs was originally authored by [Ryan Murray](https://github.com/rymurr). Contributors in this repo are credited for laying the groundwork and maintaining the adapter till version 1.0.6.5. The dbt-dremio adapter is maintained and distributed by Dremio starting with version 1.1.0b.
## Getting started

- [Install dbt-dremio](https://docs.getdbt.com/reference/warehouse-setups/dremio-setup)
- Version 1.7.0 of dbt-dremio requires dbt-core >= 1.2.0 and <= 1.7.*. Installing dbt-dremio will automatically upgrade existing dbt-core versions earlier than 1.2.0 to 1.7.*, or install dbt-core v1.7.0 if no version of dbt-core is found.
- Version 1.8.0 of dbt-dremio requires dbt-core >= 1.8.*.
- Read the [introduction](https://docs.getdbt.com/docs/introduction/) and [viewpoint](https://docs.getdbt.com/docs/about/viewpoint/)

## Join the dbt Community
Expand Down
6 changes: 3 additions & 3 deletions THIRD_PARTY_LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
charset-normalizer 3.1.0 MIT License
click 8.1.3 BSD License
colorama 0.4.6 BSD License
dbt-core 1.7.0 Apache Software License
dbt-dremio 1.7.0 Apache Software License
dbt-core 1.8.8 Apache Software License
dbt-dremio 1.8.0 Apache Software License
dbt-extractor 0.4.1 Apache Software License
dbt-tests-adapter 1.7.0 Apache Software License
dbt-tests-adapter 1.8.0 Apache Software License
exceptiongroup 1.1.1 MIT License
future 0.18.3 MIT License
grpclib 0.4.3 BSD License
Expand Down
14 changes: 14 additions & 0 deletions dbt/include/dremio/macros/adapters/validate_sql.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*Copyright (C) 2022 Dremio Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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.*/

{% macro default__validate_sql(sql) -%}
{% call statement('validate_sql') -%}
explain plan for {{ sql }}
Expand Down
14 changes: 14 additions & 0 deletions dbt/include/dremio/macros/utils/data_types.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*Copyright (C) 2022 Dremio Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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.*/

{% macro dremio__type_string() %}
{{ return(api.Column.translate_type("VARCHAR")) }}
{% endmacro %}
6 changes: 3 additions & 3 deletions tests/functional/adapter/basic/test_base_mat.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import pytest
from dbt.tests.adapter.basic.test_base import BaseSimpleMaterializations

# Copyright (C) 2022 Dremio Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -15,6 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
from dbt.tests.adapter.basic.test_base import BaseSimpleMaterializations

from tests.utils.util import (
relation_from_name,
check_relations_equal,
Expand Down
14 changes: 14 additions & 0 deletions tests/functional/adapter/basic/test_override.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (C) 2022 Dremio Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

import pytest
from dbt.tests.util import run_dbt
from dbt_common.exceptions import CompilationError
Expand Down
14 changes: 14 additions & 0 deletions tests/functional/adapter/dremio_specific/test_schema_parsing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (C) 2022 Dremio Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

import pytest
import yaml
from dbt.tests.util import (
Expand Down
14 changes: 14 additions & 0 deletions tests/functional/adapter/empty/test_empty.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (C) 2022 Dremio Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

import pytest
from dbt.tests.adapter.empty.test_empty import BaseTestEmpty
from dbt.tests.adapter.empty import _models
Expand Down
14 changes: 14 additions & 0 deletions tests/functional/adapter/relation/test_changing_relation_type.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (C) 2022 Dremio Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

from dbt.tests.adapter.relations.test_changing_relation_type import (
BaseChangeRelationTypeValidator,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (C) 2022 Dremio Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

import pytest
from dbt.tests.util import run_dbt
from tests.utils.util import BUCKET, relation_from_name
Expand Down
14 changes: 14 additions & 0 deletions tests/functional/adapter/unit_testing/test_unit_testing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (C) 2022 Dremio Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

import pytest
from dbt.tests.adapter.unit_testing.test_types import BaseUnitTestingTypes
from dbt.tests.adapter.unit_testing.test_case_insensitivity import (
Expand Down
14 changes: 14 additions & 0 deletions tests/functional/adapter/utils/test_timestamps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (C) 2022 Dremio Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

import pytest
from dbt.tests.adapter.utils.test_timestamps import BaseCurrentTimestamps
from tests.fixtures.profiles import unique_schema, dbt_profile_data
Expand Down
11 changes: 11 additions & 0 deletions tests/hooks/fixtures.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Copyright (C) 2022 Dremio Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

from tests.utils.util import SOURCE

MODEL_PRE_HOOK = f"""
Expand Down
11 changes: 11 additions & 0 deletions tests/hooks/test_model_hooks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Copyright (C) 2022 Dremio Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

import os
import pytest

Expand Down
11 changes: 11 additions & 0 deletions tests/hooks/test_run_hooks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Copyright (C) 2022 Dremio Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

import os
import pytest

Expand Down
11 changes: 11 additions & 0 deletions tests/simple_copy/test_copy_uppercase.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Copyright (C) 2022 Dremio Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

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

Expand Down
22 changes: 21 additions & 1 deletion tests/simple_copy/test_simple_copy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Copyright (C) 2022 Dremio Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

# mix in biguery
# mix in snowflake

Expand Down Expand Up @@ -103,7 +114,16 @@ def test_simple_copy_with_materialized_views(self, project):
assert len(results) == 1
results = run_dbt()
assert len(results) == 7

# Copyright (C) 2022 Dremio Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

def _dremio_get_tables_in_schema(self):
sql = """
Expand Down
11 changes: 11 additions & 0 deletions tests/unit/test_payload_error.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Copyright (C) 2022 Dremio Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

from unittest import mock, TestCase
from dbt.adapters.dremio.api.cursor import DremioCursor
from dbt.adapters.dremio.api.parameters import Parameters
Expand Down

0 comments on commit 76c64af

Please sign in to comment.