From eed35d7a8c256ad03ab7400ac877591eeb05ce1a Mon Sep 17 00:00:00 2001 From: Danny Meijer <10511979+dannymeijer@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:32:09 +0200 Subject: [PATCH 1/2] adding test for snowflake imports --- tests/spark/integrations/snowflake/test_snowflake.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/spark/integrations/snowflake/test_snowflake.py b/tests/spark/integrations/snowflake/test_snowflake.py index e29b305..bbeada4 100644 --- a/tests/spark/integrations/snowflake/test_snowflake.py +++ b/tests/spark/integrations/snowflake/test_snowflake.py @@ -39,6 +39,11 @@ "warehouse": "warehouse", } +def test_snowflake_module_import(): + # test that the pass-through imports in the koheesio.spark snowflake modules are working + from koheesio.spark.writers import snowflake as snowflake_readers + from koheesio.spark.readers import snowflake as snowflake_writers + class TestSnowflakeReader: reader_options = {"dbtable": "table", **COMMON_OPTIONS} From 8eeb139bd6505dcca4e041809d9dfc45c582e433 Mon Sep 17 00:00:00 2001 From: Danny Meijer <10511979+dannymeijer@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:35:00 +0200 Subject: [PATCH 2/2] fix snowflake imports --- src/koheesio/spark/readers/snowflake.py | 2 +- src/koheesio/spark/writers/snowflake.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/koheesio/spark/readers/snowflake.py b/src/koheesio/spark/readers/snowflake.py index bef8946..1041a4d 100644 --- a/src/koheesio/spark/readers/snowflake.py +++ b/src/koheesio/spark/readers/snowflake.py @@ -28,6 +28,6 @@ More detailed class descriptions can be found in the class docstrings. """ -from koheesio.steps.integrations.snowflake import DbTableQuery, Query, SnowflakeReader +from koheesio.spark.snowflake import DbTableQuery, Query, SnowflakeReader __all__ = ["SnowflakeReader", "Query", "DbTableQuery"] diff --git a/src/koheesio/spark/writers/snowflake.py b/src/koheesio/spark/writers/snowflake.py index 71719a4..51d45ad 100644 --- a/src/koheesio/spark/writers/snowflake.py +++ b/src/koheesio/spark/writers/snowflake.py @@ -1,5 +1,5 @@ """This module contains the SnowflakeWriter class, which is used to write data to Snowflake.""" -from koheesio.steps.integrations.snowflake import SnowflakeWriter +from koheesio.spark.snowflake import SnowflakeWriter __all__ = ["SnowflakeWriter"]