dagster-airbyte 0.26.21__py3-none-any.whl → 0.27.1__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.
Potentially problematic release.
This version of dagster-airbyte might be problematic. Click here for more details.
- dagster_airbyte/asset_defs.py +19 -16
- dagster_airbyte/managed/reconciliation.py +3 -3
- dagster_airbyte/resources.py +5 -5
- dagster_airbyte/version.py +1 -1
- {dagster_airbyte-0.26.21.dist-info → dagster_airbyte-0.27.1.dist-info}/METADATA +3 -3
- {dagster_airbyte-0.26.21.dist-info → dagster_airbyte-0.27.1.dist-info}/RECORD +10 -10
- {dagster_airbyte-0.26.21.dist-info → dagster_airbyte-0.27.1.dist-info}/WHEEL +0 -0
- {dagster_airbyte-0.26.21.dist-info → dagster_airbyte-0.27.1.dist-info}/entry_points.txt +0 -0
- {dagster_airbyte-0.26.21.dist-info → dagster_airbyte-0.27.1.dist-info}/licenses/LICENSE +0 -0
- {dagster_airbyte-0.26.21.dist-info → dagster_airbyte-0.27.1.dist-info}/top_level.txt +0 -0
dagster_airbyte/asset_defs.py
CHANGED
|
@@ -13,14 +13,14 @@ from dagster import (
|
|
|
13
13
|
AssetKey,
|
|
14
14
|
AssetOut,
|
|
15
15
|
AutoMaterializePolicy,
|
|
16
|
-
|
|
16
|
+
LegacyFreshnessPolicy,
|
|
17
17
|
Nothing,
|
|
18
18
|
Output,
|
|
19
19
|
ResourceDefinition,
|
|
20
20
|
SourceAsset,
|
|
21
21
|
_check as check,
|
|
22
22
|
)
|
|
23
|
-
from dagster._annotations import beta
|
|
23
|
+
from dagster._annotations import beta, deprecated_param
|
|
24
24
|
from dagster._core.definitions import AssetsDefinition, multi_asset
|
|
25
25
|
from dagster._core.definitions.cacheable_assets import (
|
|
26
26
|
AssetsDefinitionCacheableData,
|
|
@@ -72,7 +72,7 @@ def _build_airbyte_asset_defn_metadata(
|
|
|
72
72
|
group_name: Optional[str] = None,
|
|
73
73
|
io_manager_key: Optional[str] = None,
|
|
74
74
|
schema_by_table_name: Optional[Mapping[str, TableSchema]] = None,
|
|
75
|
-
|
|
75
|
+
legacy_freshness_policy: Optional[LegacyFreshnessPolicy] = None,
|
|
76
76
|
auto_materialize_policy: Optional[AutoMaterializePolicy] = None,
|
|
77
77
|
) -> AssetsDefinitionCacheableData:
|
|
78
78
|
asset_key_prefix = (
|
|
@@ -161,8 +161,10 @@ def _build_airbyte_asset_defn_metadata(
|
|
|
161
161
|
for table in tables
|
|
162
162
|
}
|
|
163
163
|
),
|
|
164
|
-
|
|
165
|
-
{output:
|
|
164
|
+
legacy_freshness_policies_by_output_name=(
|
|
165
|
+
{output: legacy_freshness_policy for output in outputs}
|
|
166
|
+
if legacy_freshness_policy
|
|
167
|
+
else None
|
|
166
168
|
),
|
|
167
169
|
auto_materialize_policies_by_output_name=(
|
|
168
170
|
{output: auto_materialize_policy for output in outputs}
|
|
@@ -202,9 +204,9 @@ def _build_airbyte_assets_from_metadata(
|
|
|
202
204
|
else None
|
|
203
205
|
),
|
|
204
206
|
io_manager_key=io_manager_key,
|
|
205
|
-
|
|
206
|
-
assets_defn_meta.
|
|
207
|
-
if assets_defn_meta.
|
|
207
|
+
legacy_freshness_policy=(
|
|
208
|
+
assets_defn_meta.legacy_freshness_policies_by_output_name.get(k)
|
|
209
|
+
if assets_defn_meta.legacy_freshness_policies_by_output_name
|
|
208
210
|
else None
|
|
209
211
|
),
|
|
210
212
|
dagster_type=Nothing,
|
|
@@ -249,6 +251,7 @@ def _build_airbyte_assets_from_metadata(
|
|
|
249
251
|
return _assets
|
|
250
252
|
|
|
251
253
|
|
|
254
|
+
@deprecated_param(param="legacy_freshness_policy", breaking_version="1.12.0")
|
|
252
255
|
def build_airbyte_assets(
|
|
253
256
|
connection_id: str,
|
|
254
257
|
destination_tables: Sequence[str],
|
|
@@ -260,7 +263,7 @@ def build_airbyte_assets(
|
|
|
260
263
|
deps: Optional[Iterable[Union[CoercibleToAssetKey, AssetsDefinition, SourceAsset]]] = None,
|
|
261
264
|
upstream_assets: Optional[set[AssetKey]] = None,
|
|
262
265
|
schema_by_table_name: Optional[Mapping[str, TableSchema]] = None,
|
|
263
|
-
|
|
266
|
+
legacy_freshness_policy: Optional[LegacyFreshnessPolicy] = None,
|
|
264
267
|
stream_to_asset_map: Optional[Mapping[str, str]] = None,
|
|
265
268
|
auto_materialize_policy: Optional[AutoMaterializePolicy] = None,
|
|
266
269
|
) -> Sequence[AssetsDefinition]:
|
|
@@ -282,7 +285,7 @@ def build_airbyte_assets(
|
|
|
282
285
|
deps (Optional[Sequence[Union[AssetsDefinition, SourceAsset, str, AssetKey]]]):
|
|
283
286
|
A list of assets to add as sources.
|
|
284
287
|
upstream_assets (Optional[Set[AssetKey]]): Deprecated, use deps instead. A list of assets to add as sources.
|
|
285
|
-
|
|
288
|
+
legacy_freshness_policy (Optional[LegacyFreshnessPolicy]): A legacy freshness policy to apply to the assets
|
|
286
289
|
stream_to_asset_map (Optional[Mapping[str, str]]): A mapping of an Airbyte stream name to a Dagster asset.
|
|
287
290
|
This allows the use of the "prefix" setting in Airbyte with special characters that aren't valid asset names.
|
|
288
291
|
auto_materialize_policy (Optional[AutoMaterializePolicy]): An auto materialization policy to apply to the assets.
|
|
@@ -329,7 +332,7 @@ def build_airbyte_assets(
|
|
|
329
332
|
),
|
|
330
333
|
}
|
|
331
334
|
),
|
|
332
|
-
|
|
335
|
+
legacy_freshness_policy=legacy_freshness_policy,
|
|
333
336
|
auto_materialize_policy=auto_materialize_policy,
|
|
334
337
|
)
|
|
335
338
|
for table in tables
|
|
@@ -592,7 +595,7 @@ class AirbyteCoreCacheableAssetsDefinition(CacheableAssetsDefinition):
|
|
|
592
595
|
connection_filter: Optional[Callable[[AirbyteConnectionMetadata], bool]],
|
|
593
596
|
connection_to_asset_key_fn: Optional[Callable[[AirbyteConnectionMetadata, str], AssetKey]],
|
|
594
597
|
connection_to_freshness_policy_fn: Optional[
|
|
595
|
-
Callable[[AirbyteConnectionMetadata], Optional[
|
|
598
|
+
Callable[[AirbyteConnectionMetadata], Optional[LegacyFreshnessPolicy]]
|
|
596
599
|
],
|
|
597
600
|
connection_to_auto_materialize_policy_fn: Optional[
|
|
598
601
|
Callable[[AirbyteConnectionMetadata], Optional[AutoMaterializePolicy]]
|
|
@@ -675,7 +678,7 @@ class AirbyteCoreCacheableAssetsDefinition(CacheableAssetsDefinition):
|
|
|
675
678
|
),
|
|
676
679
|
schema_by_table_name=schema_by_table_name,
|
|
677
680
|
table_to_asset_key_fn=table_to_asset_key,
|
|
678
|
-
|
|
681
|
+
legacy_freshness_policy=self._connection_to_freshness_policy_fn(connection),
|
|
679
682
|
auto_materialize_policy=self._connection_to_auto_materialize_policy_fn(connection),
|
|
680
683
|
)
|
|
681
684
|
|
|
@@ -708,7 +711,7 @@ class AirbyteInstanceCacheableAssetsDefinition(AirbyteCoreCacheableAssetsDefinit
|
|
|
708
711
|
connection_filter: Optional[Callable[[AirbyteConnectionMetadata], bool]],
|
|
709
712
|
connection_to_asset_key_fn: Optional[Callable[[AirbyteConnectionMetadata, str], AssetKey]],
|
|
710
713
|
connection_to_freshness_policy_fn: Optional[
|
|
711
|
-
Callable[[AirbyteConnectionMetadata], Optional[
|
|
714
|
+
Callable[[AirbyteConnectionMetadata], Optional[LegacyFreshnessPolicy]]
|
|
712
715
|
],
|
|
713
716
|
connection_to_auto_materialize_policy_fn: Optional[
|
|
714
717
|
Callable[[AirbyteConnectionMetadata], Optional[AutoMaterializePolicy]]
|
|
@@ -822,7 +825,7 @@ class AirbyteYAMLCacheableAssetsDefinition(AirbyteCoreCacheableAssetsDefinition)
|
|
|
822
825
|
connection_directories: Optional[Sequence[str]],
|
|
823
826
|
connection_to_asset_key_fn: Optional[Callable[[AirbyteConnectionMetadata, str], AssetKey]],
|
|
824
827
|
connection_to_freshness_policy_fn: Optional[
|
|
825
|
-
Callable[[AirbyteConnectionMetadata], Optional[
|
|
828
|
+
Callable[[AirbyteConnectionMetadata], Optional[LegacyFreshnessPolicy]]
|
|
826
829
|
],
|
|
827
830
|
connection_to_auto_materialize_policy_fn: Optional[
|
|
828
831
|
Callable[[AirbyteConnectionMetadata], Optional[AutoMaterializePolicy]]
|
|
@@ -914,7 +917,7 @@ def load_assets_from_airbyte_instance(
|
|
|
914
917
|
Callable[[AirbyteConnectionMetadata, str], AssetKey]
|
|
915
918
|
] = None,
|
|
916
919
|
connection_to_freshness_policy_fn: Optional[
|
|
917
|
-
Callable[[AirbyteConnectionMetadata], Optional[
|
|
920
|
+
Callable[[AirbyteConnectionMetadata], Optional[LegacyFreshnessPolicy]]
|
|
918
921
|
] = None,
|
|
919
922
|
connection_to_auto_materialize_policy_fn: Optional[
|
|
920
923
|
Callable[[AirbyteConnectionMetadata], Optional[AutoMaterializePolicy]]
|
|
@@ -6,7 +6,7 @@ from dagster import AssetKey
|
|
|
6
6
|
from dagster._annotations import beta, deprecated, public
|
|
7
7
|
from dagster._core.definitions.cacheable_assets import CacheableAssetsDefinition
|
|
8
8
|
from dagster._core.definitions.events import CoercibleToAssetKeyPrefix
|
|
9
|
-
from dagster._core.definitions.freshness_policy import
|
|
9
|
+
from dagster._core.definitions.freshness_policy import LegacyFreshnessPolicy
|
|
10
10
|
from dagster._core.definitions.resource_definition import ResourceDefinition
|
|
11
11
|
from dagster._core.execution.context.init import build_init_resource_context
|
|
12
12
|
from dagster._utils.merger import deep_merge_dicts
|
|
@@ -698,7 +698,7 @@ class AirbyteManagedElementCacheableAssetsDefinition(AirbyteInstanceCacheableAss
|
|
|
698
698
|
connection_to_io_manager_key_fn: Optional[Callable[[str], Optional[str]]],
|
|
699
699
|
connection_to_asset_key_fn: Optional[Callable[[AirbyteConnectionMetadata, str], AssetKey]],
|
|
700
700
|
connection_to_freshness_policy_fn: Optional[
|
|
701
|
-
Callable[[AirbyteConnectionMetadata], Optional[
|
|
701
|
+
Callable[[AirbyteConnectionMetadata], Optional[LegacyFreshnessPolicy]]
|
|
702
702
|
],
|
|
703
703
|
):
|
|
704
704
|
defined_conn_names = {conn.name for conn in connections}
|
|
@@ -744,7 +744,7 @@ def load_assets_from_connections(
|
|
|
744
744
|
Callable[[AirbyteConnectionMetadata, str], AssetKey]
|
|
745
745
|
] = None,
|
|
746
746
|
connection_to_freshness_policy_fn: Optional[
|
|
747
|
-
Callable[[AirbyteConnectionMetadata], Optional[
|
|
747
|
+
Callable[[AirbyteConnectionMetadata], Optional[LegacyFreshnessPolicy]]
|
|
748
748
|
] = None,
|
|
749
749
|
) -> CacheableAssetsDefinition:
|
|
750
750
|
"""Loads Airbyte connection assets from a configured AirbyteResource instance, checking against a list of AirbyteConnection objects.
|
dagster_airbyte/resources.py
CHANGED
|
@@ -313,7 +313,7 @@ class AirbyteCloudResource(BaseAirbyteResource):
|
|
|
313
313
|
destination_tables=["releases", "tags", "teams"],
|
|
314
314
|
)
|
|
315
315
|
|
|
316
|
-
|
|
316
|
+
Definitions(
|
|
317
317
|
assets=[airbyte_assets],
|
|
318
318
|
resources={"airbyte": my_airbyte_resource},
|
|
319
319
|
)
|
|
@@ -439,7 +439,7 @@ class AirbyteResource(BaseAirbyteResource):
|
|
|
439
439
|
destination_tables=["releases", "tags", "teams"],
|
|
440
440
|
)
|
|
441
441
|
|
|
442
|
-
|
|
442
|
+
Definitions(
|
|
443
443
|
assets=[airbyte_assets],
|
|
444
444
|
resources={"airbyte": my_airbyte_resource},
|
|
445
445
|
)
|
|
@@ -1225,7 +1225,7 @@ class AirbyteCloudWorkspace(ConfigurableResource):
|
|
|
1225
1225
|
)
|
|
1226
1226
|
|
|
1227
1227
|
airbyte_specs = airbyte_workspace.load_asset_specs()
|
|
1228
|
-
|
|
1228
|
+
dg.Definitions(assets=airbyte_specs, resources={"airbyte": airbyte_workspace})
|
|
1229
1229
|
"""
|
|
1230
1230
|
dagster_airbyte_translator = dagster_airbyte_translator or DagsterAirbyteTranslator()
|
|
1231
1231
|
|
|
@@ -1372,7 +1372,7 @@ def load_airbyte_cloud_asset_specs(
|
|
|
1372
1372
|
)
|
|
1373
1373
|
|
|
1374
1374
|
airbyte_cloud_specs = load_airbyte_cloud_asset_specs(airbyte_cloud_workspace)
|
|
1375
|
-
|
|
1375
|
+
dg.Definitions(assets=airbyte_cloud_specs)
|
|
1376
1376
|
|
|
1377
1377
|
Filter connections by name:
|
|
1378
1378
|
|
|
@@ -1392,7 +1392,7 @@ def load_airbyte_cloud_asset_specs(
|
|
|
1392
1392
|
workspace=airbyte_cloud_workspace,
|
|
1393
1393
|
connection_selector_fn=lambda connection: connection.name in ["connection1", "connection2"]
|
|
1394
1394
|
)
|
|
1395
|
-
|
|
1395
|
+
dg.Definitions(assets=airbyte_cloud_specs)
|
|
1396
1396
|
"""
|
|
1397
1397
|
dagster_airbyte_translator = dagster_airbyte_translator or DagsterAirbyteTranslator()
|
|
1398
1398
|
|
dagster_airbyte/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.
|
|
1
|
+
__version__ = "0.27.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dagster-airbyte
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.27.1
|
|
4
4
|
Summary: Package for integrating Airbyte with Dagster.
|
|
5
5
|
Home-page: https://github.com/dagster-io/dagster/tree/master/python_modules/libraries/dagster-airbyte
|
|
6
6
|
Author: Dagster Labs
|
|
@@ -14,13 +14,13 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
15
|
Requires-Python: >=3.9,<3.13
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: dagster==1.
|
|
17
|
+
Requires-Dist: dagster==1.11.1
|
|
18
18
|
Requires-Dist: requests
|
|
19
19
|
Provides-Extra: test
|
|
20
20
|
Requires-Dist: requests-mock; extra == "test"
|
|
21
21
|
Requires-Dist: flaky; extra == "test"
|
|
22
22
|
Provides-Extra: managed
|
|
23
|
-
Requires-Dist: dagster-managed-elements==0.
|
|
23
|
+
Requires-Dist: dagster-managed-elements==0.27.1; extra == "managed"
|
|
24
24
|
Dynamic: author
|
|
25
25
|
Dynamic: author-email
|
|
26
26
|
Dynamic: classifier
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
dagster_airbyte/__init__.py,sha256=hbVxc3kc9gslNvQXqCkkMeMXRk51tyUeHiRK1ozt6rg,1864
|
|
2
2
|
dagster_airbyte/asset_decorator.py,sha256=U6pbeyjE0meeXHed7ZVhaRfAsvLwTvDB14BSyDUYHqY,4565
|
|
3
|
-
dagster_airbyte/asset_defs.py,sha256=
|
|
3
|
+
dagster_airbyte/asset_defs.py,sha256=6t7u4uUdml4D3-NRnVBNWDDwlaT_RnuPYaVJ0Jn_jYA,51568
|
|
4
4
|
dagster_airbyte/cli.py,sha256=HErteP1MjfHozKKSrznh0yAreKETbXp5NDHzXGsdvvE,425
|
|
5
5
|
dagster_airbyte/ops.py,sha256=oOEczVYpqVRTc1-0osfpR5FZbPjNJDYihgRjk_qtOQA,4229
|
|
6
6
|
dagster_airbyte/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
|
|
7
|
-
dagster_airbyte/resources.py,sha256=
|
|
7
|
+
dagster_airbyte/resources.py,sha256=M-XD_-xtwWRcmHxC-ANVq25QNEzuPupbY0WQIeTO720,56478
|
|
8
8
|
dagster_airbyte/translator.py,sha256=CL2EKeZIahgoFvtZpfEwVa2KmCuvUENXByM6F7369LQ,7529
|
|
9
9
|
dagster_airbyte/types.py,sha256=TYUjI3skjLYeANjesgJ-IAJNu8bAnL1ymsUfz5LsRTE,1565
|
|
10
10
|
dagster_airbyte/utils.py,sha256=SupW5PLwzyZHWTHKe17vh2PlGdcRT7xbYbMCT-ubGDo,4081
|
|
11
|
-
dagster_airbyte/version.py,sha256=
|
|
11
|
+
dagster_airbyte/version.py,sha256=lnka9HWRxSmlQAffgSpaSitns-Djhy2OArtj9IVwxrY,23
|
|
12
12
|
dagster_airbyte/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
dagster_airbyte/components/workspace_component/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
dagster_airbyte/components/workspace_component/component.py,sha256=P1zQEe48NeP0lDMvoTcoXJlfEz-zCMdQ2hNcz5doffw,5473
|
|
15
15
|
dagster_airbyte/components/workspace_component/scaffolder.py,sha256=4wMKNCsi8DBJ94jCKkofmqDW93u0UUCo8t0JYKZ10q4,1051
|
|
16
16
|
dagster_airbyte/managed/__init__.py,sha256=6SBtyNOMJ9Cu2UIwFExJHpL_ZVFo3rPMvyIxVOsKvWE,469
|
|
17
|
-
dagster_airbyte/managed/reconciliation.py,sha256=
|
|
17
|
+
dagster_airbyte/managed/reconciliation.py,sha256=3uXDuCOdpAzFIvsO1tlVlTQLjVqAoy7OJNPU0m6bHMM,34821
|
|
18
18
|
dagster_airbyte/managed/types.py,sha256=isPfX8L9YwtZAf9Vk4hhxBePLR00AEldsdK2TsM1H2o,14611
|
|
19
19
|
dagster_airbyte/managed/generated/__init__.py,sha256=eYq-yfXEeffuKAVFXY8plD0se1wHjFNVqklpbu9gljw,108
|
|
20
20
|
dagster_airbyte/managed/generated/destinations.py,sha256=x1wmWlXvOJHtfaZva3ErdKuVS--sDvfidSXR5ji9G5w,119692
|
|
21
21
|
dagster_airbyte/managed/generated/sources.py,sha256=y0TPNvcRd8c9mhje-NoXsHeKRPt1nXcpww8mNAtqCps,282685
|
|
22
|
-
dagster_airbyte-0.
|
|
23
|
-
dagster_airbyte-0.
|
|
24
|
-
dagster_airbyte-0.
|
|
25
|
-
dagster_airbyte-0.
|
|
26
|
-
dagster_airbyte-0.
|
|
27
|
-
dagster_airbyte-0.
|
|
22
|
+
dagster_airbyte-0.27.1.dist-info/licenses/LICENSE,sha256=4lsMW-RCvfVD4_F57wrmpe3vX1xwUk_OAKKmV_XT7Z0,11348
|
|
23
|
+
dagster_airbyte-0.27.1.dist-info/METADATA,sha256=-djMDFFuiq1zEI4x7XGGadUS5LTpfY2phdAbms3G3Xg,1115
|
|
24
|
+
dagster_airbyte-0.27.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
25
|
+
dagster_airbyte-0.27.1.dist-info/entry_points.txt,sha256=096yvfMP-gNsCgDg9vDQtinis5QGpD-e_kHEhcHaML8,120
|
|
26
|
+
dagster_airbyte-0.27.1.dist-info/top_level.txt,sha256=HLwIRQCzqItn88_KbPP8DNTKKQEBUVKk6NCn4PrCtqY,16
|
|
27
|
+
dagster_airbyte-0.27.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|