Skip to content

Commit

Permalink
Update sling import in dagster-components
Browse files Browse the repository at this point in the history
  • Loading branch information
maximearmstrong committed Jan 13, 2025
1 parent f9b0e32 commit a76273f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import importlib.util

_has_dagster_dbt = importlib.util.find_spec("dagster_dbt") is not None
_has_dagster_embedded_elt = importlib.util.find_spec("dagster_embedded_elt") is not None
_has_dagster_sling = importlib.util.find_spec("dagster_sling") is not None

if _has_dagster_dbt:
from dagster_components.lib.dbt_project.component import (
DbtProjectComponent as DbtProjectComponent,
)

if _has_dagster_embedded_elt:
if _has_dagster_sling:
from dagster_components.lib.sling_replication_collection.component import (
SlingReplicationCollectionComponent as SlingReplicationCollectionComponent,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from dagster._core.definitions.definitions_class import Definitions
from dagster._core.definitions.events import AssetMaterialization
from dagster._core.definitions.result import MaterializeResult
from dagster_embedded_elt.sling import DagsterSlingTranslator, SlingResource, sling_assets
from dagster_embedded_elt.sling.resources import AssetExecutionContext
from dagster_sling import DagsterSlingTranslator, SlingResource, sling_assets
from dagster_sling.resources import AssetExecutionContext
from pydantic import BaseModel
from typing_extensions import Self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dagster_components.lib.sling_replication_collection.component import (
SlingReplicationCollectionComponent,
)
from dagster_embedded_elt.sling import SlingResource
from dagster_sling import SlingResource


@component_type(name="debug_sling_replication")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from dagster_components.lib.sling_replication_collection.component import (
SlingReplicationCollectionComponent,
)
from dagster_embedded_elt.sling import SlingResource
from dagster_sling import SlingResource

from dagster_components_tests.utils import assert_assets, get_asset_keys, script_load_context

Expand Down

0 comments on commit a76273f

Please sign in to comment.