From 1cceda31b81bef40277d84f5c953ab96162b6c5a Mon Sep 17 00:00:00 2001 From: Colton Padden Date: Fri, 22 Mar 2024 14:50:44 -0400 Subject: [PATCH] rm empty translator usage --- docs/content/integrations/embedded-elt.mdx | 11 ++--------- .../integrations/embedded_elt/postgres_snowflake.py | 6 +----- .../integrations/embedded_elt/s3_snowflake.py | 6 +----- .../sling_decorator/sling_decorator/__init__.py | 6 +----- 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/docs/content/integrations/embedded-elt.mdx b/docs/content/integrations/embedded-elt.mdx index 597bbf7fd4ef0..7c0bbcf871314 100644 --- a/docs/content/integrations/embedded-elt.mdx +++ b/docs/content/integrations/embedded-elt.mdx @@ -162,7 +162,6 @@ This is an example of how to setup a Sling sync between two databases such as Po ```python file=/integrations/embedded_elt/postgres_snowflake.py from dagster_embedded_elt.sling import ( - DagsterSlingTranslator, SlingConnectionResource, SlingResource, sling_assets, @@ -208,10 +207,7 @@ replication_config = { } -@sling_assets( - replication_config=replication_config, - dagster_sling_translator=DagsterSlingTranslator(), -) +@sling_assets(replication_config=replication_config) def my_assets(context, sling: SlingResource): yield from sling.replicate(context=context) ``` @@ -244,10 +240,7 @@ replication_config = { } -@sling_assets( - replication_config=replication_config, - dagster_sling_translator=DagsterSlingTranslator(), -) +@sling_assets(replication_config=replication_config) def my_assets(context, sling: SlingResource): yield from sling.replicate(context=context) ``` diff --git a/examples/docs_snippets/docs_snippets/integrations/embedded_elt/postgres_snowflake.py b/examples/docs_snippets/docs_snippets/integrations/embedded_elt/postgres_snowflake.py index c74133c912c15..bf45f8e0204c4 100644 --- a/examples/docs_snippets/docs_snippets/integrations/embedded_elt/postgres_snowflake.py +++ b/examples/docs_snippets/docs_snippets/integrations/embedded_elt/postgres_snowflake.py @@ -2,7 +2,6 @@ # pyright: reportOptionalMemberAccess=none from dagster_embedded_elt.sling import ( - DagsterSlingTranslator, SlingConnectionResource, SlingResource, sling_assets, @@ -48,9 +47,6 @@ } -@sling_assets( - replication_config=replication_config, - dagster_sling_translator=DagsterSlingTranslator(), -) +@sling_assets(replication_config=replication_config) def my_assets(context, sling: SlingResource): yield from sling.replicate(context=context) diff --git a/examples/docs_snippets/docs_snippets/integrations/embedded_elt/s3_snowflake.py b/examples/docs_snippets/docs_snippets/integrations/embedded_elt/s3_snowflake.py index aefacb73c01ba..852b3017825b9 100644 --- a/examples/docs_snippets/docs_snippets/integrations/embedded_elt/s3_snowflake.py +++ b/examples/docs_snippets/docs_snippets/integrations/embedded_elt/s3_snowflake.py @@ -2,7 +2,6 @@ # pyright: reportOptionalMemberAccess=none from dagster_embedded_elt.sling import ( - DagsterSlingTranslator, SlingConnectionResource, SlingResource, sling_assets, @@ -45,10 +44,7 @@ } -@sling_assets( - replication_config=replication_config, - dagster_sling_translator=DagsterSlingTranslator(), -) +@sling_assets(replication_config=replication_config) def my_assets(context, sling: SlingResource): yield from sling.replicate(context=context) diff --git a/examples/experimental/sling_decorator/sling_decorator/__init__.py b/examples/experimental/sling_decorator/sling_decorator/__init__.py index ec9e1c62b7ddc..3eef6f7f687ef 100644 --- a/examples/experimental/sling_decorator/sling_decorator/__init__.py +++ b/examples/experimental/sling_decorator/sling_decorator/__init__.py @@ -1,6 +1,5 @@ from dagster import Definitions, file_relative_path from dagster_embedded_elt.sling import ( - DagsterSlingTranslator, sling_assets, ) from dagster_embedded_elt.sling.resources import ( @@ -26,10 +25,7 @@ ) -@sling_assets( - replication_config=replication_config, - dagster_sling_translator=DagsterSlingTranslator(), -) +@sling_assets(replication_config=replication_config) def my_assets(context, sling: SlingResource): yield from sling.replicate(context=context) for row in sling.stream_raw_logs():