airflow-dbt-python 3.6.0__tar.gz → 3.6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/PKG-INFO +3 -2
  2. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/__version__.py +1 -1
  3. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/hooks/target.py +4 -1
  4. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/utils/configs.py +15 -3
  5. airflow_dbt_python-3.6.2/airflow_dbt_python/utils/version.py +31 -0
  6. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python.egg-info/PKG-INFO +3 -2
  7. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python.egg-info/requires.txt +1 -0
  8. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/pyproject.toml +3 -4
  9. airflow_dbt_python-3.6.0/airflow_dbt_python/utils/version.py +0 -43
  10. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/LICENSE +0 -0
  11. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/README.md +0 -0
  12. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/__init__.py +0 -0
  13. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/hooks/__init__.py +0 -0
  14. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/hooks/dbt.py +0 -0
  15. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/hooks/fs/__init__.py +0 -0
  16. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/hooks/fs/gcs.py +0 -0
  17. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/hooks/fs/git.py +0 -0
  18. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/hooks/fs/local.py +0 -0
  19. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/hooks/fs/s3.py +0 -0
  20. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/operators/__init__.py +0 -0
  21. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/operators/dbt.py +0 -0
  22. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/utils/__init__.py +0 -0
  23. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/utils/enums.py +0 -0
  24. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/utils/env.py +0 -0
  25. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python/utils/url.py +0 -0
  26. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python.egg-info/SOURCES.txt +0 -0
  27. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python.egg-info/dependency_links.txt +0 -0
  28. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/airflow_dbt_python.egg-info/top_level.txt +0 -0
  29. {airflow_dbt_python-3.6.0 → airflow_dbt_python-3.6.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airflow-dbt-python
3
- Version: 3.6.0
3
+ Version: 3.6.2
4
4
  Summary: A collection of Airflow operators, hooks, and utilities to execute dbt commands
5
5
  Author-email: Tomás Farías Santana <tomas@tomasfarias.dev>
6
6
  License-Expression: MIT
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
- Requires-Python: <3.14,>=3.10
15
+ Requires-Python: <3.15,>=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: apache-airflow<4.0,>=2.8; python_version < "3.12"
@@ -20,6 +20,7 @@ Requires-Dist: apache-airflow<4.0,>=2.9; python_version >= "3.12" and python_ver
20
20
  Requires-Dist: apache-airflow<4.0,>=3.1; python_version >= "3.13"
21
21
  Requires-Dist: contextlib-chdir==1.0.2; python_version < "3.11"
22
22
  Requires-Dist: dbt-core<2.0.0,>=1.8.0
23
+ Requires-Dist: packaging>=20.0
23
24
  Provides-Extra: airflow-providers
24
25
  Requires-Dist: apache-airflow-providers-amazon>=3.0.0; extra == "airflow-providers"
25
26
  Requires-Dist: apache-airflow-providers-google>=11.0.0; extra == "airflow-providers"
@@ -3,4 +3,4 @@
3
3
  __author__ = "Tomás Farías Santana"
4
4
  __copyright__ = "Copyright 2021 Tomás Farías Santana"
5
5
  __title__ = "airflow-dbt-python"
6
- __version__ = "3.6.0"
6
+ __version__ = "3.6.2"
@@ -211,7 +211,9 @@ class DbtConnectionHook(BaseHook, ABC, metaclass=DbtConnectionHookMeta):
211
211
  """Get a dbt hook class depend on Airflow connection type."""
212
212
  conn = cls.get_connection(conn_id)
213
213
 
214
- if hook_cls := cls._dbt_hooks_by_conn_type.get(conn.conn_type):
214
+ if conn.conn_type is not None and (
215
+ hook_cls := cls._dbt_hooks_by_conn_type.get(conn.conn_type)
216
+ ):
215
217
  return hook_cls(conn=conn)
216
218
  raise KeyError(
217
219
  f"There are no DbtConnectionHook subclasses with conn_type={conn.conn_type}"
@@ -515,6 +517,7 @@ class DbtTrinoHook(DbtConnectionHook):
515
517
  DbtConnectionParam("method", default="none"),
516
518
  DbtConnectionParam("http_scheme", default="https"),
517
519
  DbtConnectionParam("verify", default=True),
520
+ DbtConnectionParam("cert", default=None),
518
521
  DbtConnectionParam("database", "catalog", "hive"),
519
522
  "catalog",
520
523
  "host",
@@ -42,6 +42,7 @@ from airflow_dbt_python.utils.enums import FromStrEnum, LogFormat, Output
42
42
  from airflow_dbt_python.utils.version import (
43
43
  DBT_INSTALLED_GTE_1_9,
44
44
  DBT_INSTALLED_GTE_1_10_7,
45
+ DBT_INSTALLED_GTE_1_12,
45
46
  )
46
47
 
47
48
 
@@ -192,6 +193,7 @@ class BaseConfig:
192
193
  require_nested_cumulative_type_params: Optional[bool] = None
193
194
  require_ref_searches_node_package_before_root: Optional[bool] = None
194
195
  require_resource_names_without_spaces: Optional[bool] = None
196
+ require_source_and_semantic_model_names_without_spaces: Optional[bool] = None
195
197
  require_unique_project_resource_names: Optional[bool] = None
196
198
  require_valid_schema_from_generate_schema_name: Optional[bool] = None
197
199
  require_yaml_configuration_for_mf_time_spines: Optional[bool] = None
@@ -435,9 +437,19 @@ class BaseConfig:
435
437
  # TODO: Support for catalog integrations
436
438
  active_integrations=[], # type: ignore
437
439
  )
438
- task = self.dbt_task(
439
- args=local_flags, config=runtime_config, manifest=manifest
440
- )
440
+ if DBT_INSTALLED_GTE_1_12 and issubclass(self.dbt_task, FreshnessTask):
441
+ # dbt-core>=1.12 made FreshnessTask.__init__ require catalogs, unlike
442
+ # its sibling ConfiguredTask subclasses, which default it to None.
443
+ task = self.dbt_task(
444
+ args=local_flags,
445
+ config=runtime_config,
446
+ manifest=manifest,
447
+ catalogs=[],
448
+ )
449
+ else:
450
+ task = self.dbt_task(
451
+ args=local_flags, config=runtime_config, manifest=manifest
452
+ )
441
453
  elif issubclass(self.dbt_task, DepsTask):
442
454
  task = self.dbt_task(args=local_flags, project=project)
443
455
  elif issubclass(self.dbt_task, DebugTask):
@@ -0,0 +1,31 @@
1
+ """Provides utilities to differentiate between installed dbt versions.
2
+
3
+ These are only used to ensure backwards compatibility with older versions of dbt.
4
+ """
5
+
6
+ from importlib.metadata import version
7
+
8
+ from packaging.version import Version
9
+
10
+ DBT_VERSION = Version(version("dbt-core"))
11
+
12
+ DBT_INSTALLED_GTE_1_9 = DBT_VERSION >= Version("1.9.0")
13
+ DBT_INSTALLED_GTE_1_10_7 = DBT_VERSION >= Version("1.10.7")
14
+ DBT_INSTALLED_GTE_1_12 = DBT_VERSION >= Version("1.12.0")
15
+
16
+ DBT_INSTALLED_1_8 = Version("1.8.0") <= DBT_VERSION < Version("1.9.0")
17
+ DBT_INSTALLED_1_9 = Version("1.9.0") <= DBT_VERSION < Version("2.0.0")
18
+
19
+
20
+ def _get_base_airflow_version_tuple() -> tuple[int, int, int]:
21
+ from airflow import __version__
22
+ from packaging.version import Version
23
+
24
+ airflow_version = Version(__version__)
25
+ return airflow_version.major, airflow_version.minor, airflow_version.micro
26
+
27
+
28
+ AIRFLOW_V_3_0_PLUS = _get_base_airflow_version_tuple() >= (3, 0, 0)
29
+ AIRFLOW_V_3_1_PLUS = _get_base_airflow_version_tuple() >= (3, 1, 0)
30
+ AIRFLOW_V_3_3_PLUS = _get_base_airflow_version_tuple() >= (3, 3, 0)
31
+ AIRFLOW_V_3_0 = AIRFLOW_V_3_0_PLUS and not AIRFLOW_V_3_1_PLUS
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airflow-dbt-python
3
- Version: 3.6.0
3
+ Version: 3.6.2
4
4
  Summary: A collection of Airflow operators, hooks, and utilities to execute dbt commands
5
5
  Author-email: Tomás Farías Santana <tomas@tomasfarias.dev>
6
6
  License-Expression: MIT
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
- Requires-Python: <3.14,>=3.10
15
+ Requires-Python: <3.15,>=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: apache-airflow<4.0,>=2.8; python_version < "3.12"
@@ -20,6 +20,7 @@ Requires-Dist: apache-airflow<4.0,>=2.9; python_version >= "3.12" and python_ver
20
20
  Requires-Dist: apache-airflow<4.0,>=3.1; python_version >= "3.13"
21
21
  Requires-Dist: contextlib-chdir==1.0.2; python_version < "3.11"
22
22
  Requires-Dist: dbt-core<2.0.0,>=1.8.0
23
+ Requires-Dist: packaging>=20.0
23
24
  Provides-Extra: airflow-providers
24
25
  Requires-Dist: apache-airflow-providers-amazon>=3.0.0; extra == "airflow-providers"
25
26
  Requires-Dist: apache-airflow-providers-google>=11.0.0; extra == "airflow-providers"
@@ -1,4 +1,5 @@
1
1
  dbt-core<2.0.0,>=1.8.0
2
+ packaging>=20.0
2
3
 
3
4
  [:python_version < "3.11"]
4
5
  contextlib-chdir==1.0.2
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "airflow-dbt-python"
3
- version = "3.6.0"
3
+ version = "3.6.2"
4
4
  description = "A collection of Airflow operators, hooks, and utilities to execute dbt commands"
5
5
  authors = [{ name = "Tomás Farías Santana", email = "tomas@tomasfarias.dev" }]
6
6
  license = "MIT"
7
7
  readme = "README.md"
8
- requires-python = ">=3.10,<3.14"
8
+ requires-python = ">=3.10,<3.15"
9
9
  classifiers = [
10
10
  "Development Status :: 5 - Production/Stable",
11
11
 
@@ -24,6 +24,7 @@ dependencies = [
24
24
  "apache-airflow>=3.1,<4.0; python_version>='3.13'",
25
25
  "contextlib-chdir==1.0.2;python_version<'3.11'",
26
26
  "dbt-core>=1.8.0,<2.0.0",
27
+ "packaging>=20.0",
27
28
  ]
28
29
 
29
30
  [project.urls]
@@ -90,8 +91,6 @@ dev = [
90
91
  "pytest-mock>=3.14.0",
91
92
  "pytest-postgresql>=5",
92
93
  "ruff>=0.0.254",
93
- # Pinned as Airflow crashes: https://github.com/apache/airflow/issues/57426.
94
- "structlog<=25.4",
95
94
  "types-PyYAML>=6.0.7",
96
95
  "types-freezegun>=1.1.6",
97
96
  ]
@@ -1,43 +0,0 @@
1
- """Provides utilities to differentiate between installed dbt versions.
2
-
3
- These are only used to ensure backwards compatibility with older versions of dbt.
4
- """
5
-
6
- try:
7
- from dbt.semver import Matchers, VersionSpecifier
8
- except ImportError:
9
- from dbt_common.semver import Matchers, VersionSpecifier
10
-
11
- from dbt.version import installed
12
-
13
- DBT_1_8 = VersionSpecifier(
14
- major="1", minor="8", patch="0", matcher=Matchers.GREATER_THAN_OR_EQUAL
15
- )
16
- DBT_1_9 = VersionSpecifier(
17
- major="1", minor="9", patch="0", matcher=Matchers.GREATER_THAN_OR_EQUAL
18
- )
19
- DBT_1_10_7 = VersionSpecifier(
20
- major="1", minor="10", patch="7", matcher=Matchers.GREATER_THAN_OR_EQUAL
21
- )
22
- DBT_2_0 = VersionSpecifier(
23
- major="2", minor="0", patch="0", matcher=Matchers.GREATER_THAN_OR_EQUAL
24
- )
25
-
26
- DBT_INSTALLED_GTE_1_9 = installed.compare(DBT_1_9) == 1
27
- DBT_INSTALLED_GTE_1_10_7 = installed.compare(DBT_1_10_7) == 1
28
-
29
- DBT_INSTALLED_1_8 = DBT_1_8 < installed < DBT_1_9
30
- DBT_INSTALLED_1_9 = DBT_1_9 < installed < DBT_2_0
31
-
32
-
33
- def _get_base_airflow_version_tuple() -> tuple[int, int, int]:
34
- from airflow import __version__
35
- from packaging.version import Version
36
-
37
- airflow_version = Version(__version__)
38
- return airflow_version.major, airflow_version.minor, airflow_version.micro
39
-
40
-
41
- AIRFLOW_V_3_0_PLUS = _get_base_airflow_version_tuple() >= (3, 0, 0)
42
- AIRFLOW_V_3_1_PLUS = _get_base_airflow_version_tuple() >= (3, 1, 0)
43
- AIRFLOW_V_3_0 = AIRFLOW_V_3_0_PLUS and not AIRFLOW_V_3_1_PLUS