829 Commits

Author SHA1 Message Date
Mike Alfare
986d31db89 Turn off main tests (#1312)
* turn off tests on main
* remove issue label workflows to avoid alerts
2025-02-10 12:14:36 -05:00
Mike Alfare
a21cc45cb2 Turn off main (#1310)
* disable issue creation and point users to dbt-adapters
* turn off dependabot
* update pull request template to point users to dbt-adapters
* remove contributing guide content and point users to the monorepo
* remove readme guide content and point users to the monorepo
* remove scheduled main branch tests
* update the branch used for nightly releases
2025-02-04 18:43:26 -05:00
Leah Procopi
5d935eedba Feature: Custom Iceberg base_location_root (#1289)
* update relation & add tests

* switch if/else pattern

* add change log

* add test for dynamic table with path and subpath

* modify base_location config

* update to base_location_root, include schema and table name in path

* resolve linting error (f-string nested double quotes)

* resolve linting error (move to new line)

* add unit tests & make final edits to functional tests

* lint unit test

* update changie

* update dt test cases for iceberg to be dynamic

---------

Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com>
2025-01-24 14:29:16 -05:00
Mike Alfare
b687ac477a ADAP-1115: Move to hatch and pyproject.toml (#1250)
* move config files into pyproject.toml and hatch.toml
* update workflow files to use hatch.toml
* move test matrix into the workflow
* fix pytest config in pyproject.toml
2024-12-20 11:02:31 -05:00
Andrew C. Hawkins
b8607e9d18 Change how a column of type VECTOR is parsed (#1169)
* Change how a column of type VECTOR is parsed

* Add changelog entry

---------

Co-authored-by: Andrew Hawkins <andrew@auba.com>
Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com>
2024-12-19 15:07:39 -08:00
Mike Alfare
efc68e4c32 Update default python version for python models (#1273)
* update the default python version for python models; add a configuration file to collect future settings
2024-12-13 15:17:05 -08:00
Mila Page
b3eeb083ce Fix refresh_strategy = auto semantics for dynamic tables (#1268)
* Add failing test.

* Parametrize cases

* Change comparison logic for when to rebuild if DT has auto refresh strategy (implicit or explicit).

* Add changelog

---------

Co-authored-by: VersusFacit <versusfacit@users.noreply.github.com>
2024-12-09 21:44:30 +00:00
Michelle Ark
457c361a84 [Refactor] use new model.batch context vars (#1258) 2024-12-05 16:42:45 -05:00
Michelle Ark
86cf6e61b9 support MicrobatchConcurrency capability (#1259) 2024-12-05 15:37:57 -05:00
Colin Rogers
0b24a5a2d3 update libpq-dev dependency to 13.18-0+deb11u1 (#1262) 2024-12-04 09:05:38 -08:00
Michelle Ark
5cc5d224f9 Use timestamp_tz type in microbatch delete DDL (#1257) 2024-12-02 11:05:29 -05:00
FishtownBuildBot
54999b260f Cleanup main after cutting new 1.9.latest branch (#1255)
* Clean up changelog on main

* Bumping version to 1.10.0a1

* Code quality cleanup
2024-12-02 02:53:45 +00:00
pei
8e027d8fcf Handle non-English Snowflake error message for non-existing schemas (#840)
* Handle Japanese Snowflake error message for non-existing schemas

* impl.py を更新

Co-authored-by: Anders <anders.swanson@dbtlabs.com>

* Changelog entry

* Update dbt/adapters/snowflake/impl.py

Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>

---------

Co-authored-by: Anders <anders.swanson@dbtlabs.com>
Co-authored-by: Doug Beatty <doug.beatty@dbtlabs.com>
Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>
Co-authored-by: colin-rogers-dbt <111200756+colin-rogers-dbt@users.noreply.github.com>
Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com>
2024-11-19 20:31:44 -05:00
Mila Page
dca565bb01 Adap 209/update iceberg docs note (#1253)
* Add url.

* Add docs url to flag itself.

* Update url in other error for more precision.

* Add changelog.
2024-11-19 10:14:20 -08:00
Mike Alfare
7c63a40c69 Make list_relations_without_caching pagination configurable (#1235)
* make list relations configurable
* update iteration to page in the config settings
* update the warning to recommend how to account for breaching the limit on list_relations
2024-11-18 15:51:51 -05:00
Mila Page
f6468f60a6 Normalize is_iceberg Field for Consistency in Snowflake with QUOTED_IDENTIFIERS_IGNORE_CASE (#1229)
* Reproduce. Test fail. Fix. Test green.

* Add changelog.

* Make a test that tests the actual behavior without hardcoding the quoted flag.

* I can't believe how elegant a solution this is.

Use a session-only configuration.

* Fix test.

* Simplify logic for this by moving this away from a quoting situation.

Columns that unquoted are capitalized regardless of the quoting ignore flag. So we let it be uppercase and then normalize it down to lowercase in Python.

* edit comments.

---------

Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com>
2024-11-09 17:41:44 -08:00
Michelle Ark
01dbd70ba3 [Microbatch] Optimizations: use view for temp relation + remove using clause during delete statement (#1192) 2024-11-06 17:33:12 -05:00
Colin Rogers
efeb82b087 remove SnowflakeAdapterResponse in favor of updated AdapterResponse in base (#1233)
* remove SnowflakeAdapterResponse in favor of updated AdapterResponse in base

* remove SnowflakeAdapterResponse in favor of updated AdapterResponse in base
2024-11-06 12:06:31 -08:00
Colin Rogers
a16654bed4 move github runner from macos-12 to macos-14 (#1230)
* move github runner from macos-12 to macos-14
2024-11-05 12:57:52 -05:00
Mike Alfare
1d299923e3 Add test cases for generic tests config (#1172)
* add test cases for generic tests config

* update tests

---------

Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com>
Co-authored-by: Colin <colin.rogers@dbtlabs.com>
2024-10-29 16:35:37 +00:00
Mila Page
ad4ccadb04 Revert requirements. (#1225)
Co-authored-by: VersusFacit <versusfacit@users.noreply.github.com>
2024-10-29 10:50:49 -04:00
Mila Page
df643a0ed4 Add snowflake telemetry. (#1209)
* Add snowflake telemetry.

* Add changelog.

* Temporary dev branch switch.

* Correct version import

* bump ci

* Temporary dev branch switch.

* Temporary dev branch switch take 2.

* Alter to meet new base schema changes.

* Fix input args.

* Change field name.

---------

Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com>
2024-10-28 14:20:45 -07:00
Mila Page
ea33cbec03 Add url. (#1222) 2024-10-22 10:08:10 -07:00
Mike Alfare
78f86674bc Drop support for Python 3.8 (#1211)
* drop support for python 3.8
2024-10-17 12:48:05 -07:00
Mike Alfare
8825ccb8bf Add query tag back to incremental models (#1212)
* add query tag back to incremental models

* fix query tag test
2024-10-17 12:16:35 -07:00
Mila Page
7dea1458ba Fix Dynamic Iceberg Table Required DDL Params (#1201)
* Fix base location not rendering without subpath and add tests.

Take optional off params that are not optional in dynamic table create DDL.

* Add changelog.

* Revert changes to external volume

* revert changes to catalog optionality.

* Tabs.

* Fix base_location_subpath generation for dynamic tables.

---------

Co-authored-by: VersusFacit <versusfacit@users.noreply.github.com>
2024-10-08 22:35:08 +00:00
Mike Alfare
d30670f476 Update database role tests to avoid colliding with parallel test runs (#1197)
* add a unique suffix to the database role to avoid colliding with parallel tests
* limit the database role privileges to just the test schema
* use the test schema prefix for uniqueness
2024-10-02 21:13:33 +00:00
FishtownBuildBot
2e732546c6 [Automated] Merged prep-release/1.9.0b1_11132127207 into target main during release process 2024-10-01 16:40:50 -04:00
Github Build Bot
139f5c3e25 Bumping version to 1.9.0b1 and generate changelog v1.9.0b1 2024-10-01 19:30:33 +00:00
Mila Page
eea98443b2 Add test for 321/support all on schema change options (#1196)
* Add iceberg ddl generation.

* Add changelog.

* add test.

---------

Co-authored-by: VersusFacit <versusfacit@users.noreply.github.com>
2024-09-30 15:58:01 -04:00
Mila Page
f60c476596 Adap 321/support all on schema change options (#1195)
* Add iceberg ddl generation

---------

Co-authored-by: VersusFacit <versusfacit@users.noreply.github.com>
2024-09-30 15:02:42 -04:00
Mike Alfare
5b595fb0a0 [Bug] Fix issue where dbt-snowflake attempts to drop database roles during grants sync (#1188)
* publish failed reproduction case
* remove database roles when standardizing the grants dict so that dbt-snowflake does not attempt to revoke them
2024-09-30 09:58:06 -04:00
Mike Alfare
0521395a30 Add support for Iceberg table format in Dynamic Tables (#1183)
* add support for iceberg dynamic tables
* remove is_dynamic-related guards as that is ga now
* simplify dynamic table testing
* add iceberg dynamic tables to existing dynamic table tests
* add standard incremental tables into the relation swap scenarios
* account for the fact that snowflake does not support renaming iceberg relations
* account for all scenarios when swapping relation types, including those which currently require a full refresh
* make it clearer which scenarios are included in each run and why by pulling the criteria into one function

---------

Co-authored-by: Mila Page <67295367+VersusFacit@users.noreply.github.com>
2024-09-27 15:52:04 -04:00
Mila Page
423111f5c7 Adap 321/add iceberg incremental models (#1194)
* Update expected rows to reflect what the append strategy actually does

* Empty commit to shift the test schema of the test off the bugged iceberg model

* More robust solution to avoid time-based model conflicts.

* prints on ci to see what's happening.

* Remove the superfluous test that is causing metadata conflicts for append.
2024-09-26 18:34:06 -07:00
Colin Rogers
0ae7479227 update dbt-common dependency to 1.10 and dbt-adapters to 1.7 (#1193)
Co-authored-by: Mila Page <67295367+VersusFacit@users.noreply.github.com>
2024-09-26 23:50:22 +00:00
Mila Page
d7632ebb2b Add logic to enable iceberg incremental tables. (#1190)
* Add logic to enable iceberg incremental tables.

* Add changelog.

* Standardize existing_relation as name of existing model.

* Improve error message for table formats.

* Update error message and add round of tests.

* Add more comprehensive tests for before/after.

* Update identifier param in incremental materialization.

* Import Mike's revision on the relation type change test.

* Try adding iceberg incremental model scenarios.

* Disable dynamic tests.

* Refine booleans for more restricting when incremental models are built.

* Update tests to reflect realities on the database.

* Add additional metadata.

* Update boolean logic for faster runs overall.

* Last bit of cleanup per code review

* Syntax error from lack of iterable.
2024-09-26 14:05:02 -07:00
Michelle Ark
583ec5eb26 Add required 'begin' config for testing microbatch models (#1189) 2024-09-23 14:57:17 -07:00
Mike Alfare
34c4442284 Dynamic Table testing improvements (#1187)
* move dynamic table tests down into the relation tests folder
* make utils more generic, move out of dynamic table tests
* add init files for namespacing in test discovery
* remove 2024_03 bundle items
2024-09-20 15:18:59 -07:00
Mike Alfare
084674f68f Remove a macro that is entirely a docstring (#1185)
* remove a macro that only contains a docstring
2024-09-19 10:54:19 -04:00
Mila Page
0bfef5b4ab Throw error when building Iceberg tables without behavior flag set (#1184)
* pipe the behavior through to relation in a temporary way to help with warnings in cli

* Adjust flag to new dbt-common setup.

* add changelog.

* Throw a compiler warning for iceberg model build without flag.

---------

Co-authored-by: VersusFacit <versusfacit@users.noreply.github.com>
Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com>
2024-09-18 13:11:07 -07:00
Michelle Ark
3cbe12f454 Microbatch strategy (#1179)
* first pass: add incremental_predicates
* safely add incremental_predicates + testing
* remove requirement for unique_id

---------

Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>
2024-09-18 17:29:42 +00:00
Mila Page
49623d7309 Add support for Iceberg Table Materialization (#1170)
* Add materializations of table and dynamic table.

* Add the method to tell something is iceberg format and pipe that through to relation object

* Finish create macro and fix alters.

* Finish todo items and begin cleaning code.

* revert dynamic table changes.

* Fix the drop by fixing snowflake__show_iceberg_relations

* Transient needs sophisticated handling based on what user specifies for
transient manually.

* Try to figure out what the right None semantics are.

* Revert to original statement.

* Fix the transient behavior by passing table_type again.

* Rename object_format config param to table_format

* Migrate Jinja macros to Python.

* All classes are frozen

* Clean up the metadata queries that power is_iceberg column generation

* Fix Python models generation argument

* Add changelog.

* Try to fix duplication of join record issues.

* Use the RelationConfig protocol for type checking.

* Fix transient semantics.

* Add functional tests.

* Fix test.

* Fix test.

* Fix test and remove strip calls

* Add view test case.

* Code review comments.

* I'm using too new a version of mypy for Self.

* Add a behavior flag for iceberg table materialization.

* Flip order of flag.

* Adjust test.

---------

Co-authored-by: Mila Page <versusfacit@users.noreply.github.com>
2024-09-12 13:26:43 -07:00
leahwicz
3fbc074949 Isolating distribution testing (#1161)
* Splitting up distribution testing

* Adding back in if statement

* Adding changie file

* Fixing whitespace
2024-08-09 14:08:00 -07:00
Gerda Shank
7fb4549abc Integration workflow update to support all-in-one adapter testing (#1149) 2024-07-31 21:48:15 -04:00
Mike Alfare
f95b9192f6 make dependabot ignore patch updates (#1139)
Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com>
2024-07-24 12:10:42 -04:00
Mila Page
29467c32c0 Add Python 3.12 to list of supported version (#1144)
* Adding 12 for migration testing

* Cleanup other references and add changelog.

---------

Co-authored-by: Mila Page <versusfacit@users.noreply.github.com>
2024-07-23 10:42:05 -07:00
Mike Alfare
90bf42b35a apply a unique identifier to the logs artifact for upload v4 (#1138) 2024-07-22 21:10:06 +00:00
Mike Alfare
2cdcf2b7a4 Remove freezegun as a test dependency since it is not used (#1136)
* remove freezegun as a test dependency since it is not used
2024-07-22 12:06:09 -07:00
dependabot[bot]
6e41ad2c86 Update tox requirement from ~=4.11 to ~=4.16 (#1135)
* Update tox requirement from ~=4.11 to ~=4.16

Updates the requirements on [tox](https://github.com/tox-dev/tox) to permit the latest version.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.11.0...4.16.0)

---
updated-dependencies:
- dependency-name: tox
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add automated changelog yaml from template for bot PR

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Github Build Bot <buildbot@fishtownanalytics.com>
Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com>
2024-07-19 16:38:32 +00:00
dependabot[bot]
dacc40802d Bump pre-commit from 3.7.0 to 3.7.1 (#1119)
* Bump pre-commit from 3.7.0 to 3.7.1

Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 3.7.0 to 3.7.1.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v3.7.0...v3.7.1)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add automated changelog yaml from template for bot PR

* loosen precommit pin

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Github Build Bot <buildbot@fishtownanalytics.com>
Co-authored-by: Mike Alfare <mike.alfare@dbtlabs.com>
Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com>
2024-07-19 15:59:06 +00:00