Skip to content

Commit

Permalink
Merge branch 'main' into migrateOffCircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-rogers-dbt authored Jan 8, 2024
2 parents c0a37ae + 5210d0a commit 9b9dc79
Show file tree
Hide file tree
Showing 19 changed files with 99 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231027-230254.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Bump mypy from 1.6.0 to 1.6.1"
time: 2023-10-27T23:02:54.00000Z
custom:
Author: dependabot[bot]
PR: 926
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231108-222326.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update black requirement from ~=23.10 to ~=23.11"
time: 2023-11-08T22:23:26.00000Z
custom:
Author: dependabot[bot]
PR: 942
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231110-224056.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Bump mypy from 1.6.1 to 1.7.0"
time: 2023-11-10T22:40:56.00000Z
custom:
Author: dependabot[bot]
PR: 946
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231113-224111.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update pytest-xdist requirement from ~=3.3 to ~=3.4"
time: 2023-11-13T22:41:11.00000Z
custom:
Author: dependabot[bot]
PR: 947
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231127-220733.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update pytest-xdist requirement from ~=3.4 to ~=3.5"
time: 2023-11-27T22:07:33.00000Z
custom:
Author: dependabot[bot]
PR: 951
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231127-220737.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update wheel requirement from ~=0.41 to ~=0.42"
time: 2023-11-27T22:07:37.00000Z
custom:
Author: dependabot[bot]
PR: 952
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231127-220741.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Bump mypy from 1.7.0 to 1.7.1"
time: 2023-11-27T22:07:41.00000Z
custom:
Author: dependabot[bot]
PR: 953
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231204-224210.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update freezegun requirement from ~=1.2 to ~=1.3"
time: 2023-12-04T22:42:10.00000Z
custom:
Author: dependabot[bot]
PR: 956
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231212-223929.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update black requirement from ~=23.11 to ~=23.12"
time: 2023-12-12T22:39:29.00000Z
custom:
Author: dependabot[bot]
PR: 959
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20231107-134141.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Support new agate Integer type and empty seed test
time: 2023-11-07T13:41:41.033441-05:00
custom:
Author: gshank
Issue: "935"
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20231221-081949.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix hardcoded file format for python models
time: 2023-12-21T08:19:49.630806+02:00
custom:
Author: ben-schreiber
Issue: "803"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20231119-132050.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Add tests for --empty flag
time: 2023-11-19T13:20:50.076459-05:00
custom:
Author: michelleark
Issue: "949"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20231214-134728.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Remove unused `invalid_insert_overwrite_delta_msg` message
time: 2023-12-14T13:47:28.444107-07:00
custom:
Author: dbeatty10
Issue: "962"
4 changes: 4 additions & 0 deletions dbt/adapters/spark/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ def convert_number_type(cls, agate_table: agate.Table, col_idx: int) -> str:
decimals = agate_table.aggregate(agate.MaxPrecision(col_idx))
return "double" if decimals else "bigint"

@classmethod
def convert_integer_type(cls, agate_table: agate.Table, col_idx: int) -> str:
return "bigint"

@classmethod
def convert_date_type(cls, agate_table: agate.Table, col_idx: int) -> str:
return "date"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,12 @@
You can only choose this strategy when file_format is set to 'delta' or 'iceberg' or 'hudi'
{%- endset %}

{% set invalid_insert_overwrite_delta_msg -%}
Invalid incremental strategy provided: {{ raw_strategy }}
You cannot use this strategy when file_format is set to 'delta' or 'iceberg'
Use the 'append' or 'merge' strategy instead
{%- endset %}

{% set invalid_insert_overwrite_endpoint_msg -%}
Invalid incremental strategy provided: {{ raw_strategy }}
You cannot use this strategy when connecting via endpoint
Use the 'append' or 'merge' strategy instead
{%- endset %}

{% if raw_strategy not in ['append', 'merge', 'insert_overwrite'] %}
{% do exceptions.raise_compiler_error(invalid_strategy_msg) %}
{%-else %}
Expand Down
2 changes: 1 addition & 1 deletion dbt/include/spark/macros/materializations/table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ else:
msg = f"{type(df)} is not a supported type for dbt Python materialization"
raise Exception(msg)

df.write.mode("overwrite").format("delta").option("overwriteSchema", "true").saveAsTable("{{ target_relation }}")
df.write.mode("overwrite").format("{{ config.get('file_format', 'delta') }}").option("overwriteSchema", "true").saveAsTable("{{ target_relation }}")
{%- endmacro -%}

{%macro py_script_comment()%}
Expand Down
10 changes: 5 additions & 5 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ git+https://github.com/dbt-labs/dbt-core.git@c2bc2f009bbeeb46b3c69d082ab4d485597

# if version 1.x or greater -> pin to major version
# if version 0.x -> pin to minor
black~=23.10
black~=23.12
bumpversion~=0.6.0
click~=8.1
flake8~=6.1;python_version>="3.8"
flaky~=3.7
freezegun~=1.2
freezegun~=1.3
ipdb~=0.13.13
mypy==1.6.0 # patch updates have historically introduced breaking changes
mypy==1.7.1 # patch updates have historically introduced breaking changes
pip-tools~=7.3
pre-commit~=3.5
pre-commit-hooks~=4.5
pytest~=7.4
pytest-csv~=3.0
pytest-dotenv~=0.5.2
pytest-logbook~=1.2
pytest-xdist~=3.3
pytest-xdist~=3.5
pytz~=2023.3
tox~=4.11
types-pytz~=2023.3
types-requests~=2.31
twine~=4.0
wheel~=0.41
wheel~=0.42

# Adapter specific dependencies
mock~=5.1
Expand Down
5 changes: 5 additions & 0 deletions tests/functional/adapter/empty/test_empty.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from dbt.tests.adapter.empty.test_empty import BaseTestEmpty


class TestSparkEmpty(BaseTestEmpty):
pass
5 changes: 5 additions & 0 deletions tests/functional/adapter/test_simple_seed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from dbt.tests.adapter.simple_seed.test_seed import BaseTestEmptySeed


class TestBigQueryEmptySeed(BaseTestEmptySeed):
pass

0 comments on commit 9b9dc79

Please sign in to comment.