dagster-dbt 0.27.16__py3-none-any.whl → 0.28.0__py3-none-any.whl
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.
- dagster_dbt/asset_utils.py +3 -21
- dagster_dbt/cloud/asset_defs.py +1 -21
- dagster_dbt/components/dbt_project/component.py +97 -1
- dagster_dbt/dagster_dbt_translator.py +30 -59
- dagster_dbt/freshness_builder.py +6 -2
- dagster_dbt/version.py +1 -1
- {dagster_dbt-0.27.16.dist-info → dagster_dbt-0.28.0.dist-info}/METADATA +2 -2
- {dagster_dbt-0.27.16.dist-info → dagster_dbt-0.28.0.dist-info}/RECORD +12 -12
- {dagster_dbt-0.27.16.dist-info → dagster_dbt-0.28.0.dist-info}/WHEEL +0 -0
- {dagster_dbt-0.27.16.dist-info → dagster_dbt-0.28.0.dist-info}/entry_points.txt +0 -0
- {dagster_dbt-0.27.16.dist-info → dagster_dbt-0.28.0.dist-info}/licenses/LICENSE +0 -0
- {dagster_dbt-0.27.16.dist-info → dagster_dbt-0.28.0.dist-info}/top_level.txt +0 -0
dagster_dbt/asset_utils.py
CHANGED
|
@@ -18,7 +18,6 @@ from dagster import (
|
|
|
18
18
|
DagsterInvalidDefinitionError,
|
|
19
19
|
DagsterInvariantViolationError,
|
|
20
20
|
DefaultScheduleStatus,
|
|
21
|
-
LegacyFreshnessPolicy,
|
|
22
21
|
OpExecutionContext,
|
|
23
22
|
RunConfig,
|
|
24
23
|
ScheduleDefinition,
|
|
@@ -168,7 +167,9 @@ def get_asset_keys_by_output_name_for_source(
|
|
|
168
167
|
raise KeyError(f"Could not find a dbt source with name: {source_name}")
|
|
169
168
|
|
|
170
169
|
return {
|
|
171
|
-
dagster_name_fn(value): dagster_dbt_translator.get_asset_spec(
|
|
170
|
+
dagster_name_fn(value): dagster_dbt_translator.get_asset_spec(
|
|
171
|
+
manifest, unique_id, dbt_project
|
|
172
|
+
).key
|
|
172
173
|
for unique_id, value in matching.items()
|
|
173
174
|
}
|
|
174
175
|
|
|
@@ -604,25 +605,6 @@ def default_owners_from_dbt_resource_props(
|
|
|
604
605
|
return [owner] if isinstance(owner, str) else owner
|
|
605
606
|
|
|
606
607
|
|
|
607
|
-
def default_freshness_policy_fn(
|
|
608
|
-
dbt_resource_props: Mapping[str, Any],
|
|
609
|
-
) -> Optional[LegacyFreshnessPolicy]:
|
|
610
|
-
dagster_metadata = dbt_resource_props.get("meta", {}).get("dagster", {})
|
|
611
|
-
freshness_policy_config = dagster_metadata.get("freshness_policy", {})
|
|
612
|
-
|
|
613
|
-
freshness_policy = (
|
|
614
|
-
LegacyFreshnessPolicy(
|
|
615
|
-
maximum_lag_minutes=float(freshness_policy_config["maximum_lag_minutes"]),
|
|
616
|
-
cron_schedule=freshness_policy_config.get("cron_schedule"),
|
|
617
|
-
cron_schedule_timezone=freshness_policy_config.get("cron_schedule_timezone"),
|
|
618
|
-
)
|
|
619
|
-
if freshness_policy_config
|
|
620
|
-
else None
|
|
621
|
-
)
|
|
622
|
-
|
|
623
|
-
return freshness_policy
|
|
624
|
-
|
|
625
|
-
|
|
626
608
|
def default_auto_materialize_policy_fn(
|
|
627
609
|
dbt_resource_props: Mapping[str, Any],
|
|
628
610
|
) -> Optional[AutoMaterializePolicy]:
|
dagster_dbt/cloud/asset_defs.py
CHANGED
|
@@ -33,7 +33,6 @@ from dagster_dbt.asset_utils import (
|
|
|
33
33
|
default_asset_key_fn,
|
|
34
34
|
default_auto_materialize_policy_fn,
|
|
35
35
|
default_description_fn,
|
|
36
|
-
default_freshness_policy_fn,
|
|
37
36
|
default_group_from_dbt_resource_props,
|
|
38
37
|
get_node,
|
|
39
38
|
)
|
|
@@ -326,10 +325,6 @@ class DbtCloudCacheableAssetsDefinition(CacheableAssetsDefinition):
|
|
|
326
325
|
def get_group_name(cls, dbt_resource_props): # pyright: ignore[reportIncompatibleMethodOverride]
|
|
327
326
|
return self._node_info_to_group_fn(dbt_resource_props)
|
|
328
327
|
|
|
329
|
-
@classmethod
|
|
330
|
-
def get_freshness_policy(cls, dbt_resource_props): # pyright: ignore[reportIncompatibleMethodOverride]
|
|
331
|
-
return self._node_info_to_freshness_policy_fn(dbt_resource_props)
|
|
332
|
-
|
|
333
328
|
@classmethod
|
|
334
329
|
def get_auto_materialize_policy(cls, dbt_resource_props): # pyright: ignore[reportIncompatibleMethodOverride]
|
|
335
330
|
return self._node_info_to_auto_materialize_policy_fn(dbt_resource_props)
|
|
@@ -375,11 +370,6 @@ class DbtCloudCacheableAssetsDefinition(CacheableAssetsDefinition):
|
|
|
375
370
|
for spec in specs
|
|
376
371
|
},
|
|
377
372
|
},
|
|
378
|
-
legacy_freshness_policies_by_output_name={
|
|
379
|
-
spec.key.to_python_identifier(): spec.legacy_freshness_policy
|
|
380
|
-
for spec in specs
|
|
381
|
-
if spec.legacy_freshness_policy
|
|
382
|
-
},
|
|
383
373
|
auto_materialize_policies_by_output_name={
|
|
384
374
|
spec.key.to_python_identifier(): spec.auto_materialize_policy
|
|
385
375
|
for spec in specs
|
|
@@ -546,9 +536,6 @@ def load_assets_from_dbt_cloud_job(
|
|
|
546
536
|
node_info_to_group_fn: Callable[
|
|
547
537
|
[Mapping[str, Any]], Optional[str]
|
|
548
538
|
] = default_group_from_dbt_resource_props,
|
|
549
|
-
node_info_to_freshness_policy_fn: Callable[
|
|
550
|
-
[Mapping[str, Any]], Optional[LegacyFreshnessPolicy]
|
|
551
|
-
] = default_freshness_policy_fn,
|
|
552
539
|
node_info_to_auto_materialize_policy_fn: Callable[
|
|
553
540
|
[Mapping[str, Any]], Optional[AutoMaterializePolicy]
|
|
554
541
|
] = default_auto_materialize_policy_fn,
|
|
@@ -570,13 +557,6 @@ def load_assets_from_dbt_cloud_job(
|
|
|
570
557
|
dbt source -> AssetKey([source_name, table_name])
|
|
571
558
|
node_info_to_group_fn (Dict[str, Any] -> Optional[str]): A function that takes a
|
|
572
559
|
dictionary of dbt node info and returns the group that this node should be assigned to.
|
|
573
|
-
node_info_to_freshness_policy_fn (Dict[str, Any] -> Optional[FreshnessPolicy]): A function
|
|
574
|
-
that takes a dictionary of dbt node info and optionally returns a FreshnessPolicy that
|
|
575
|
-
should be applied to this node. By default, freshness policies will be created from
|
|
576
|
-
config applied to dbt models, i.e.:
|
|
577
|
-
`dagster_freshness_policy={"maximum_lag_minutes": 60, "cron_schedule": "0 9 * * *"}`
|
|
578
|
-
will result in that model being assigned
|
|
579
|
-
`FreshnessPolicy(maximum_lag_minutes=60, cron_schedule="0 9 * * *")`
|
|
580
560
|
node_info_to_auto_materialize_policy_fn (Dict[str, Any] -> Optional[AutoMaterializePolicy]):
|
|
581
561
|
A function that takes a dictionary of dbt node info and optionally returns a AutoMaterializePolicy
|
|
582
562
|
that should be applied to this node. By default, AutoMaterializePolicies will be created from
|
|
@@ -631,7 +611,7 @@ def load_assets_from_dbt_cloud_job(
|
|
|
631
611
|
job_id=job_id,
|
|
632
612
|
node_info_to_asset_key=node_info_to_asset_key,
|
|
633
613
|
node_info_to_group_fn=node_info_to_group_fn,
|
|
634
|
-
node_info_to_freshness_policy_fn=
|
|
614
|
+
node_info_to_freshness_policy_fn=lambda _: None,
|
|
635
615
|
node_info_to_auto_materialize_policy_fn=node_info_to_auto_materialize_policy_fn,
|
|
636
616
|
partitions_def=partitions_def,
|
|
637
617
|
partition_key_to_vars_fn=partition_key_to_vars_fn,
|
|
@@ -113,6 +113,18 @@ class DbtProjectComponent(StateBackedComponent, dg.Resolvable):
|
|
|
113
113
|
|
|
114
114
|
Scaffold a DbtProjectComponent definition by running `dg scaffold defs dagster_dbt.DbtProjectComponent --project-path path/to/your/existing/dbt_project`
|
|
115
115
|
in the Dagster project directory.
|
|
116
|
+
|
|
117
|
+
Example:
|
|
118
|
+
|
|
119
|
+
.. code-block:: yaml
|
|
120
|
+
|
|
121
|
+
# defs.yaml
|
|
122
|
+
|
|
123
|
+
type: dagster_dbt.DbtProjectComponent
|
|
124
|
+
attributes:
|
|
125
|
+
project: "{{ project_root }}/path/to/dbt_project"
|
|
126
|
+
cli_args:
|
|
127
|
+
- build
|
|
116
128
|
"""
|
|
117
129
|
|
|
118
130
|
project: Annotated[
|
|
@@ -213,7 +225,7 @@ class DbtProjectComponent(StateBackedComponent, dg.Resolvable):
|
|
|
213
225
|
def defs_state_config(self) -> DefsStateConfig:
|
|
214
226
|
return DefsStateConfig(
|
|
215
227
|
key=f"{self.__class__.__name__}[{self.project.name}]",
|
|
216
|
-
|
|
228
|
+
management_type=DefsStateManagementType.LOCAL_FILESYSTEM,
|
|
217
229
|
refresh_if_dev=self.prepare_if_dev,
|
|
218
230
|
)
|
|
219
231
|
|
|
@@ -225,9 +237,66 @@ class DbtProjectComponent(StateBackedComponent, dg.Resolvable):
|
|
|
225
237
|
def _base_translator(self) -> "DagsterDbtTranslator":
|
|
226
238
|
return DagsterDbtTranslator(self.translation_settings)
|
|
227
239
|
|
|
240
|
+
def get_resource_props(self, manifest: Mapping[str, Any], unique_id: str) -> Mapping[str, Any]:
|
|
241
|
+
"""Given a parsed manifest and a dbt unique_id, returns the dictionary of properties
|
|
242
|
+
for the corresponding dbt resource (e.g. model, seed, snapshot, source) as defined
|
|
243
|
+
in your dbt project. This can be used as a convenience method when overriding the
|
|
244
|
+
`get_asset_spec` method.
|
|
245
|
+
|
|
246
|
+
Args:
|
|
247
|
+
manifest (Mapping[str, Any]): The parsed manifest of the dbt project.
|
|
248
|
+
unique_id (str): The unique_id of the dbt resource.
|
|
249
|
+
|
|
250
|
+
Returns:
|
|
251
|
+
Mapping[str, Any]: The dictionary of properties for the corresponding dbt resource.
|
|
252
|
+
|
|
253
|
+
Examples:
|
|
254
|
+
.. code-block:: python
|
|
255
|
+
|
|
256
|
+
class CustomDbtProjectComponent(DbtProjectComponent):
|
|
257
|
+
|
|
258
|
+
def get_asset_spec(self, manifest: Mapping[str, Any], unique_id: str, project: Optional[DbtProject]) -> dg.AssetSpec:
|
|
259
|
+
base_spec = super().get_asset_spec(manifest, unique_id, project)
|
|
260
|
+
resource_props = self.get_resource_props(manifest, unique_id)
|
|
261
|
+
if resource_props["meta"].get("use_custom_group"):
|
|
262
|
+
return base_spec.replace_attributes(group_name="custom_group")
|
|
263
|
+
else:
|
|
264
|
+
return base_spec
|
|
265
|
+
"""
|
|
266
|
+
return get_node(manifest, unique_id)
|
|
267
|
+
|
|
268
|
+
@public
|
|
228
269
|
def get_asset_spec(
|
|
229
270
|
self, manifest: Mapping[str, Any], unique_id: str, project: Optional[DbtProject]
|
|
230
271
|
) -> dg.AssetSpec:
|
|
272
|
+
"""Generates an AssetSpec for a given dbt node.
|
|
273
|
+
|
|
274
|
+
This method can be overridden in a subclass to customize how dbt nodes are converted
|
|
275
|
+
to Dagster asset specs. By default, it delegates to the configured DagsterDbtTranslator.
|
|
276
|
+
|
|
277
|
+
Args:
|
|
278
|
+
manifest: The dbt manifest dictionary containing information about all dbt nodes
|
|
279
|
+
unique_id: The unique identifier for the dbt node (e.g., "model.my_project.my_model")
|
|
280
|
+
project: The DbtProject object, if available
|
|
281
|
+
|
|
282
|
+
Returns:
|
|
283
|
+
An AssetSpec that represents the dbt node as a Dagster asset
|
|
284
|
+
|
|
285
|
+
Example:
|
|
286
|
+
Override this method to add custom tags to all dbt models:
|
|
287
|
+
|
|
288
|
+
.. code-block:: python
|
|
289
|
+
|
|
290
|
+
from dagster_dbt import DbtProjectComponent
|
|
291
|
+
import dagster as dg
|
|
292
|
+
|
|
293
|
+
class CustomDbtProjectComponent(DbtProjectComponent):
|
|
294
|
+
def get_asset_spec(self, manifest, unique_id, project):
|
|
295
|
+
base_spec = super().get_asset_spec(manifest, unique_id, project)
|
|
296
|
+
return base_spec.replace_attributes(
|
|
297
|
+
tags={**base_spec.tags, "custom_tag": "my_value"}
|
|
298
|
+
)
|
|
299
|
+
"""
|
|
231
300
|
return self._base_translator.get_asset_spec(manifest, unique_id, project)
|
|
232
301
|
|
|
233
302
|
def get_asset_check_spec(
|
|
@@ -336,7 +405,34 @@ class DbtProjectComponent(StateBackedComponent, dg.Resolvable):
|
|
|
336
405
|
iterator = iterator.fetch_row_counts()
|
|
337
406
|
return iterator
|
|
338
407
|
|
|
408
|
+
@public
|
|
339
409
|
def execute(self, context: dg.AssetExecutionContext, dbt: DbtCliResource) -> Iterator:
|
|
410
|
+
"""Executes the dbt command for the selected assets.
|
|
411
|
+
|
|
412
|
+
This method can be overridden in a subclass to customize the execution behavior,
|
|
413
|
+
such as adding custom logging, modifying CLI arguments, or handling events differently.
|
|
414
|
+
|
|
415
|
+
Args:
|
|
416
|
+
context: The asset execution context provided by Dagster
|
|
417
|
+
dbt: The DbtCliResource used to execute dbt commands
|
|
418
|
+
|
|
419
|
+
Yields:
|
|
420
|
+
Events from the dbt CLI execution (e.g., AssetMaterialization, AssetObservation)
|
|
421
|
+
|
|
422
|
+
Example:
|
|
423
|
+
Override this method to add custom logging before and after execution:
|
|
424
|
+
|
|
425
|
+
.. code-block:: python
|
|
426
|
+
|
|
427
|
+
from dagster_dbt import DbtProjectComponent
|
|
428
|
+
import dagster as dg
|
|
429
|
+
|
|
430
|
+
class CustomDbtProjectComponent(DbtProjectComponent):
|
|
431
|
+
def execute(self, context, dbt):
|
|
432
|
+
context.log.info("Starting custom dbt execution")
|
|
433
|
+
yield from super().execute(context, dbt)
|
|
434
|
+
context.log.info("Completed custom dbt execution")
|
|
435
|
+
"""
|
|
340
436
|
yield from self._get_dbt_event_iterator(context, dbt)
|
|
341
437
|
|
|
342
438
|
@cached_property
|
|
@@ -12,7 +12,6 @@ from dagster import (
|
|
|
12
12
|
AutoMaterializePolicy,
|
|
13
13
|
AutomationCondition,
|
|
14
14
|
DagsterInvalidDefinitionError,
|
|
15
|
-
LegacyFreshnessPolicy,
|
|
16
15
|
PartitionMapping,
|
|
17
16
|
)
|
|
18
17
|
from dagster._annotations import beta, public
|
|
@@ -36,7 +35,6 @@ from dagster_dbt.asset_utils import (
|
|
|
36
35
|
default_auto_materialize_policy_fn,
|
|
37
36
|
default_code_version_fn,
|
|
38
37
|
default_description_fn,
|
|
39
|
-
default_freshness_policy_fn,
|
|
40
38
|
default_group_from_dbt_resource_props,
|
|
41
39
|
default_metadata_from_dbt_resource_props,
|
|
42
40
|
default_owners_from_dbt_resource_props,
|
|
@@ -96,6 +94,34 @@ class DagsterDbtTranslator:
|
|
|
96
94
|
|
|
97
95
|
return self._settings
|
|
98
96
|
|
|
97
|
+
def get_resource_props(self, manifest: Mapping[str, Any], unique_id: str) -> Mapping[str, Any]:
|
|
98
|
+
"""Given a parsed manifest and a dbt unique_id, returns the dictionary of properties
|
|
99
|
+
for the corresponding dbt resource (e.g. model, seed, snapshot, source) as defined
|
|
100
|
+
in your dbt project. This can be used as a convenience method when overriding the
|
|
101
|
+
`get_asset_spec` method.
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
manifest (Mapping[str, Any]): The parsed manifest of the dbt project.
|
|
105
|
+
unique_id (str): The unique_id of the dbt resource.
|
|
106
|
+
|
|
107
|
+
Returns:
|
|
108
|
+
Mapping[str, Any]: The dictionary of properties for the corresponding dbt resource.
|
|
109
|
+
|
|
110
|
+
Examples:
|
|
111
|
+
.. code-block:: python
|
|
112
|
+
|
|
113
|
+
class CustomDagsterDbtTranslator(DagsterDbtTranslator):
|
|
114
|
+
|
|
115
|
+
def get_asset_spec(self, manifest: Mapping[str, Any], unique_id: str, project: Optional[DbtProject]) -> dg.AssetSpec:
|
|
116
|
+
base_spec = super().get_asset_spec(manifest, unique_id, project)
|
|
117
|
+
resource_props = self.get_resource_props(manifest, unique_id)
|
|
118
|
+
if resource_props["meta"].get("use_custom_group"):
|
|
119
|
+
return base_spec.replace_attributes(group_name="custom_group")
|
|
120
|
+
else:
|
|
121
|
+
return base_spec
|
|
122
|
+
"""
|
|
123
|
+
return get_node(manifest, unique_id)
|
|
124
|
+
|
|
99
125
|
def get_asset_spec(
|
|
100
126
|
self,
|
|
101
127
|
manifest: Mapping[str, Any],
|
|
@@ -115,7 +141,7 @@ class DagsterDbtTranslator:
|
|
|
115
141
|
return self._resolved_specs[memo_id]
|
|
116
142
|
|
|
117
143
|
group_props = {group["name"]: group for group in manifest.get("groups", {}).values()}
|
|
118
|
-
resource_props =
|
|
144
|
+
resource_props = self.get_resource_props(manifest, unique_id)
|
|
119
145
|
|
|
120
146
|
# calculate the dependencies for the asset
|
|
121
147
|
upstream_ids = get_upstream_unique_ids(manifest, resource_props)
|
|
@@ -123,7 +149,7 @@ class DagsterDbtTranslator:
|
|
|
123
149
|
AssetDep(
|
|
124
150
|
asset=self.get_asset_spec(manifest, upstream_id, project).key,
|
|
125
151
|
partition_mapping=self.get_partition_mapping(
|
|
126
|
-
resource_props,
|
|
152
|
+
resource_props, self.get_resource_props(manifest, upstream_id)
|
|
127
153
|
),
|
|
128
154
|
)
|
|
129
155
|
for upstream_id in upstream_ids
|
|
@@ -158,7 +184,6 @@ class DagsterDbtTranslator:
|
|
|
158
184
|
group_name=self.get_group_name(resource_props),
|
|
159
185
|
code_version=self.get_code_version(resource_props),
|
|
160
186
|
automation_condition=self.get_automation_condition(resource_props),
|
|
161
|
-
legacy_freshness_policy=self.get_freshness_policy(resource_props),
|
|
162
187
|
owners=self.get_owners(owners_resource_props),
|
|
163
188
|
tags=self.get_tags(resource_props),
|
|
164
189
|
kinds={"dbt", manifest.get("metadata", {}).get("adapter_type", "dbt")},
|
|
@@ -493,60 +518,6 @@ class DagsterDbtTranslator:
|
|
|
493
518
|
"""
|
|
494
519
|
return default_owners_from_dbt_resource_props(dbt_resource_props)
|
|
495
520
|
|
|
496
|
-
@public
|
|
497
|
-
@beta(emit_runtime_warning=False)
|
|
498
|
-
def get_freshness_policy(
|
|
499
|
-
self, dbt_resource_props: Mapping[str, Any]
|
|
500
|
-
) -> Optional[LegacyFreshnessPolicy]:
|
|
501
|
-
"""A function that takes a dictionary representing properties of a dbt resource, and
|
|
502
|
-
returns the Dagster :py:class:`dagster.FreshnessPolicy` for that resource.
|
|
503
|
-
|
|
504
|
-
Note that a dbt resource is unrelated to Dagster's resource concept, and simply represents
|
|
505
|
-
a model, seed, snapshot or source in a given dbt project. You can learn more about dbt
|
|
506
|
-
resources and the properties available in this dictionary here:
|
|
507
|
-
https://docs.getdbt.com/reference/artifacts/manifest-json#resource-details
|
|
508
|
-
|
|
509
|
-
This method can be overridden to provide a custom freshness policy for a dbt resource.
|
|
510
|
-
|
|
511
|
-
Args:
|
|
512
|
-
dbt_resource_props (Mapping[str, Any]): A dictionary representing the dbt resource.
|
|
513
|
-
|
|
514
|
-
Returns:
|
|
515
|
-
Optional[FreshnessPolicy]: A Dagster freshness policy.
|
|
516
|
-
|
|
517
|
-
Examples:
|
|
518
|
-
Set a custom freshness policy for all dbt resources:
|
|
519
|
-
|
|
520
|
-
.. code-block:: python
|
|
521
|
-
|
|
522
|
-
from typing import Any, Mapping
|
|
523
|
-
|
|
524
|
-
from dagster_dbt import DagsterDbtTranslator
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
class CustomDagsterDbtTranslator(DagsterDbtTranslator):
|
|
528
|
-
def get_freshness_policy(self, dbt_resource_props: Mapping[str, Any]) -> Optional[FreshnessPolicy]:
|
|
529
|
-
return FreshnessPolicy(maximum_lag_minutes=60)
|
|
530
|
-
|
|
531
|
-
Set a custom freshness policy for dbt resources with a specific tag:
|
|
532
|
-
|
|
533
|
-
.. code-block:: python
|
|
534
|
-
|
|
535
|
-
from typing import Any, Mapping
|
|
536
|
-
|
|
537
|
-
from dagster_dbt import DagsterDbtTranslator
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
class CustomDagsterDbtTranslator(DagsterDbtTranslator):
|
|
541
|
-
def get_freshness_policy(self, dbt_resource_props: Mapping[str, Any]) -> Optional[FreshnessPolicy]:
|
|
542
|
-
freshness_policy = None
|
|
543
|
-
if "my_custom_tag" in dbt_resource_props.get("tags", []):
|
|
544
|
-
freshness_policy = FreshnessPolicy(maximum_lag_minutes=60)
|
|
545
|
-
|
|
546
|
-
return freshness_policy
|
|
547
|
-
"""
|
|
548
|
-
return default_freshness_policy_fn(dbt_resource_props)
|
|
549
|
-
|
|
550
521
|
@public
|
|
551
522
|
@beta(emit_runtime_warning=False)
|
|
552
523
|
def get_auto_materialize_policy(
|
dagster_dbt/freshness_builder.py
CHANGED
|
@@ -6,7 +6,6 @@ from dagster import (
|
|
|
6
6
|
AssetsDefinition,
|
|
7
7
|
_check as check,
|
|
8
8
|
)
|
|
9
|
-
from dagster._annotations import beta
|
|
10
9
|
from dagster._core.definitions.asset_checks.asset_check_factories.freshness_checks.last_update import (
|
|
11
10
|
build_last_update_freshness_checks,
|
|
12
11
|
)
|
|
@@ -27,13 +26,18 @@ from dagster._core.errors import DagsterInvariantViolationError
|
|
|
27
26
|
if TYPE_CHECKING:
|
|
28
27
|
from dagster import AssetKey
|
|
29
28
|
|
|
29
|
+
from dagster._symbol_annotations.lifecycle import superseded
|
|
30
|
+
|
|
30
31
|
from dagster_dbt.asset_utils import (
|
|
31
32
|
get_asset_keys_to_resource_props,
|
|
32
33
|
get_manifest_and_translator_from_dbt_assets,
|
|
33
34
|
)
|
|
34
35
|
|
|
35
36
|
|
|
36
|
-
@
|
|
37
|
+
@superseded(
|
|
38
|
+
additional_warn_text="Create `FreshnessPolicy` objects for your dbt models by overriding `get_asset_spec` "
|
|
39
|
+
"in your `DagsterDbtTranslator`, or by updating the `translation` configuration of your `DbtProjectComponent` instead."
|
|
40
|
+
)
|
|
37
41
|
def build_freshness_checks_from_dbt_assets(
|
|
38
42
|
*,
|
|
39
43
|
dbt_assets: Sequence[AssetsDefinition],
|
dagster_dbt/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.
|
|
1
|
+
__version__ = "0.28.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dagster-dbt
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.28.0
|
|
4
4
|
Summary: A Dagster integration for dbt
|
|
5
5
|
Home-page: https://github.com/dagster-io/dagster/tree/master/python_modules/libraries/dagster-dbt
|
|
6
6
|
Author: Dagster Labs
|
|
@@ -15,7 +15,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
15
15
|
Classifier: Operating System :: OS Independent
|
|
16
16
|
Requires-Python: >=3.9,<3.14
|
|
17
17
|
License-File: LICENSE
|
|
18
|
-
Requires-Dist: dagster==1.
|
|
18
|
+
Requires-Dist: dagster==1.12.0
|
|
19
19
|
Requires-Dist: dbt-core<1.11,>=1.7
|
|
20
20
|
Requires-Dist: Jinja2
|
|
21
21
|
Requires-Dist: networkx
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
dagster_dbt/__init__.py,sha256=rlPCxCzovXNDiqXBUEcgNVHjZrXQXwcX3kwUhe_69C4,4708
|
|
2
2
|
dagster_dbt/asset_decorator.py,sha256=8OqlypoTwKCs6dAxOuBAO32krbHBQRLVGe6uDzpTSXE,14892
|
|
3
3
|
dagster_dbt/asset_specs.py,sha256=2EdWIhY2QZhtGXM7N-kkkeK3ClnGgYX7ayRi_X11cLg,2741
|
|
4
|
-
dagster_dbt/asset_utils.py,sha256=
|
|
4
|
+
dagster_dbt/asset_utils.py,sha256=bmUm9fCnSUVzGjBLwx14vUNOecizrLjfqlI2y8qxO2Q,44761
|
|
5
5
|
dagster_dbt/compat.py,sha256=iiAez9pLskfbwLdj6LxIrFvoU-efBpy2BETXQyAsQvY,3638
|
|
6
|
-
dagster_dbt/dagster_dbt_translator.py,sha256
|
|
6
|
+
dagster_dbt/dagster_dbt_translator.py,sha256=skUpl7NxG7ysDfDOs1pSq1c9-ciByN7LrGvO0ZsC4W4,30274
|
|
7
7
|
dagster_dbt/dbt_core_version.py,sha256=w1P62qDdbApXKv0XvUNr2p7FlwiW68csugsNaqmjNjM,38
|
|
8
8
|
dagster_dbt/dbt_manifest.py,sha256=q10Qq1whh-dLfWtFbTYXYbqBVCf0oU8T1yRPyy9ASw0,1307
|
|
9
9
|
dagster_dbt/dbt_manifest_asset_selection.py,sha256=KSEHcVdtfFZaEqSQDUsAx8H8BQe62jZxAOE_CLtwVlI,5072
|
|
10
10
|
dagster_dbt/dbt_project.py,sha256=HtUuNYbKMAPWqTOPgPeJK4u6b1nKyqHrRNB8sYwOWVw,12203
|
|
11
11
|
dagster_dbt/dbt_version.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
dagster_dbt/errors.py,sha256=a8xag0tjh8OQVkiL10_uwY4hkAgRCH6HtTGaZxIbXZI,1073
|
|
13
|
-
dagster_dbt/freshness_builder.py,sha256=
|
|
13
|
+
dagster_dbt/freshness_builder.py,sha256=DHAC3AGWAwIA7psDf72R0t5p8NjxDytGU9g5xnca1hc,6395
|
|
14
14
|
dagster_dbt/metadata_set.py,sha256=lqjASYoYeM_Ey6r8UsPUkRMwmuAIfFCFvkNm0xW5xTg,512
|
|
15
15
|
dagster_dbt/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
|
|
16
16
|
dagster_dbt/utils.py,sha256=gT6xO7buRolkhc2fa5ySUPfD1eXo3e6RJWZAKkM6yFo,8513
|
|
17
|
-
dagster_dbt/version.py,sha256=
|
|
17
|
+
dagster_dbt/version.py,sha256=MRQGtOXBhcDKeeNOL0LiB-cllo6kfd8_KGJOvaDp0XQ,23
|
|
18
18
|
dagster_dbt/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
dagster_dbt/cli/app.py,sha256=9oBx85uzAkMtBdV39vNm5rxuAGPVYzzDUs6Ek-KL0XY,13516
|
|
20
20
|
dagster_dbt/cloud/__init__.py,sha256=8WKaLuPl_pUG9Cv78GW782vrWQfqK8QtAWegkTxA9r4,441
|
|
21
|
-
dagster_dbt/cloud/asset_defs.py,sha256=
|
|
21
|
+
dagster_dbt/cloud/asset_defs.py,sha256=brrMeblPY-UUhAZ16WKOZ1vP7s9z1WZdHdK0SmSyq8o,29311
|
|
22
22
|
dagster_dbt/cloud/cli.py,sha256=VnKzBjn-BPpjn4nPZm5xSrboAKpRhlCa-4IxsN1ROCo,4525
|
|
23
23
|
dagster_dbt/cloud/ops.py,sha256=rsU4qPCRUUzeHRInZph7YEz_iynwu_KidO5vMAYHX5E,4615
|
|
24
24
|
dagster_dbt/cloud/resources.py,sha256=AWW3VTBS6zrSKeDjMJovbnu54sKena93FoZle6ZSSq8,31747
|
|
@@ -34,7 +34,7 @@ dagster_dbt/cloud_v2/sensor_builder.py,sha256=8mAm-1ZFvoiVVdxSkSQbMxg18aQUY5kazu
|
|
|
34
34
|
dagster_dbt/cloud_v2/types.py,sha256=dI-NIguj582LwTTMXdY5r0U4-INDn9anNy-ciGuEc1s,4136
|
|
35
35
|
dagster_dbt/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
dagster_dbt/components/dbt_project/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
dagster_dbt/components/dbt_project/component.py,sha256=
|
|
37
|
+
dagster_dbt/components/dbt_project/component.py,sha256=DfAif7IKnzvJSY8RJDGUzwpugSUyzZNPs_pk6E7EmFY,18661
|
|
38
38
|
dagster_dbt/components/dbt_project/scaffolder.py,sha256=AqwRnX3cFpvCSxEeEpyQj0Vei84WSWUi2BIMCtkxaDE,1893
|
|
39
39
|
dagster_dbt/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
40
|
dagster_dbt/core/dbt_cli_event.py,sha256=Yqr-UuzFF7jIcI4KRAmiAhGTX9Ay0tIMN2NaJegsrJQ,25203
|
|
@@ -50,9 +50,9 @@ dagster_dbt/include/scaffold/assets.py.jinja,sha256=JImqnDUP5ewy8RVti4IuXL70yJno
|
|
|
50
50
|
dagster_dbt/include/scaffold/definitions.py.jinja,sha256=Hou7emwkEeh5YXTdqjYFrAc2SK-Q6MgTNsQOKA_Vy3s,364
|
|
51
51
|
dagster_dbt/include/scaffold/project.py.jinja,sha256=YNtkT5Hq4VbGw-b7QcxdelhXsesIKORwVuBFGFdfeUs,432
|
|
52
52
|
dagster_dbt/include/scaffold/schedules.py.jinja,sha256=Xua_VtPjYFc498A5uaBGQ36GwV1gqciO4P3D8Yt9M-Y,413
|
|
53
|
-
dagster_dbt-0.
|
|
54
|
-
dagster_dbt-0.
|
|
55
|
-
dagster_dbt-0.
|
|
56
|
-
dagster_dbt-0.
|
|
57
|
-
dagster_dbt-0.
|
|
58
|
-
dagster_dbt-0.
|
|
53
|
+
dagster_dbt-0.28.0.dist-info/licenses/LICENSE,sha256=4lsMW-RCvfVD4_F57wrmpe3vX1xwUk_OAKKmV_XT7Z0,11348
|
|
54
|
+
dagster_dbt-0.28.0.dist-info/METADATA,sha256=XUBRuIhSbaeG0yRgt_cf2xsRvAPz3Ae7r-k2k4oVpCk,1596
|
|
55
|
+
dagster_dbt-0.28.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
56
|
+
dagster_dbt-0.28.0.dist-info/entry_points.txt,sha256=pbv0tVoTB7cByG-noE8rC6atvthh64qBaTo7PkQ9HbM,163
|
|
57
|
+
dagster_dbt-0.28.0.dist-info/top_level.txt,sha256=hoOwFvw9OpJUN1azE6UVHcxMKqhUwR_BTN0Ay-iKUDA,12
|
|
58
|
+
dagster_dbt-0.28.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|