dagster-snowflake 0.24.13__py3-none-any.whl → 0.25.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-snowflake might be problematic. Click here for more details.

@@ -17,9 +17,8 @@ from dagster import (
17
17
  from dagster._annotations import public
18
18
  from dagster._core.definitions.resource_definition import dagster_maintained_resource
19
19
  from dagster._core.storage.event_log.sql_event_log import SqlDbConnection
20
- from dagster._model.pydantic_compat_layer import compat_model_validator
21
20
  from dagster._utils.cached_method import cached_method
22
- from pydantic import Field, validator
21
+ from pydantic import Field, model_validator, validator
23
22
 
24
23
  from dagster_snowflake.constants import (
25
24
  SNOWFLAKE_PARTNER_CONNECTION_IDENTIFIER,
@@ -235,7 +234,7 @@ class SnowflakeResource(ConfigurableResource, IAttachDifferentObjectToOpContext)
235
234
  "Indicate alternative database connection engine. Permissible option is "
236
235
  "'sqlalchemy' otherwise defaults to use the Snowflake Connector for Python."
237
236
  ),
238
- is_required=False,
237
+ is_required=False, # type: ignore
239
238
  )
240
239
 
241
240
  cache_column_metadata: Optional[str] = Field(
@@ -278,7 +277,7 @@ class SnowflakeResource(ConfigurableResource, IAttachDifferentObjectToOpContext)
278
277
  )
279
278
  return v
280
279
 
281
- @compat_model_validator(mode="before")
280
+ @model_validator(mode="before")
282
281
  def validate_authentication(cls, values):
283
282
  auths_set = 0
284
283
  auths_set += 1 if values.get("password") is not None else 0
@@ -729,6 +728,7 @@ def fetch_last_updated_timestamps(
729
728
  schema: str,
730
729
  tables: Sequence[str],
731
730
  database: Optional[str] = None,
731
+ ignore_missing_tables: Optional[bool] = False,
732
732
  ) -> Mapping[str, datetime]:
733
733
  """Fetch the last updated times of a list of tables in Snowflake.
734
734
 
@@ -742,6 +742,8 @@ def fetch_last_updated_timestamps(
742
742
  tables (Sequence[str]): A list of table names to fetch the last updated time for.
743
743
  database (Optional[str]): The database of the table. Only required if the connection
744
744
  has not been set with a database.
745
+ ignore_missing_tables (Optional[bool]): If True, tables not found in Snowflake
746
+ will be excluded from the result.
745
747
 
746
748
  Returns:
747
749
  Mapping[str, datetime]: A dictionary of table names to their last updated time in UTC.
@@ -767,6 +769,8 @@ def fetch_last_updated_timestamps(
767
769
  result_correct_case = {}
768
770
  for table_name in tables:
769
771
  if table_name.upper() not in result_mapping:
772
+ if ignore_missing_tables:
773
+ continue
770
774
  raise ValueError(f"Table {table_name} could not be found.")
771
775
  last_altered = result_mapping[table_name.upper()]
772
776
  check.invariant(
@@ -1 +1 @@
1
- __version__ = "0.24.13"
1
+ __version__ = "0.25.1"
@@ -1,21 +1,20 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dagster-snowflake
3
- Version: 0.24.13
3
+ Version: 0.25.1
4
4
  Summary: Package for Snowflake Dagster framework components.
5
5
  Home-page: https://github.com/dagster-io/dagster/tree/master/python_modules/libraries/dagster-snowflake
6
6
  Author: Dagster Labs
7
7
  Author-email: hello@dagsterlabs.com
8
8
  License: Apache-2.0
9
- Classifier: Programming Language :: Python :: 3.8
10
9
  Classifier: Programming Language :: Python :: 3.9
11
10
  Classifier: Programming Language :: Python :: 3.10
12
11
  Classifier: Programming Language :: Python :: 3.11
13
12
  Classifier: Programming Language :: Python :: 3.12
14
13
  Classifier: License :: OSI Approved :: Apache Software License
15
14
  Classifier: Operating System :: OS Independent
16
- Requires-Python: >=3.8,<3.13
15
+ Requires-Python: >=3.9,<3.13
17
16
  License-File: LICENSE
18
- Requires-Dist: dagster ==1.8.13
17
+ Requires-Dist: dagster ==1.9.1
19
18
  Requires-Dist: snowflake-connector-python >=3.4.0
20
19
  Provides-Extra: pandas
21
20
  Requires-Dist: pandas ; extra == 'pandas'
@@ -0,0 +1,12 @@
1
+ dagster_snowflake/__init__.py,sha256=MeLU-ghhmyMk82I2b3qCz9h7mxgb2eMxXfkqGBjI29k,673
2
+ dagster_snowflake/constants.py,sha256=26PGL1eFncm0WfbgZjA7jaznfaRx75vVJnqbieVYeco,481
3
+ dagster_snowflake/ops.py,sha256=L_MP28fLm7_hrJmzMoDocLwyvVnkpy1LVwUSLIArKWc,2225
4
+ dagster_snowflake/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
5
+ dagster_snowflake/resources.py,sha256=Oc5D1yirb8R6WJi59zEBLfjTPeaMOKLcZhb9EYO3MWc,31384
6
+ dagster_snowflake/snowflake_io_manager.py,sha256=V2_7V-xLiz856iTUDyxouQ6S9zg5DMpqseqSxXdnfjw,17205
7
+ dagster_snowflake/version.py,sha256=ACu2Z3Q3TFgYpAno_eu9ssJ1QULjNXvjGvyqDSHrQ_o,23
8
+ dagster_snowflake-0.25.1.dist-info/LICENSE,sha256=TMatHW4_G9ldRdodEAp-l2Xa2WvsdeOh60E3v1R2jis,11349
9
+ dagster_snowflake-0.25.1.dist-info/METADATA,sha256=LcycmVJFvCuWny78CTBQN0WQhuryMEPwyR6VMpM1idM,1069
10
+ dagster_snowflake-0.25.1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
11
+ dagster_snowflake-0.25.1.dist-info/top_level.txt,sha256=uECYCiluOxLQ996SCUPBBwdK0CTyz45FjWqf7WDqMMc,18
12
+ dagster_snowflake-0.25.1.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- dagster_snowflake/__init__.py,sha256=MeLU-ghhmyMk82I2b3qCz9h7mxgb2eMxXfkqGBjI29k,673
2
- dagster_snowflake/constants.py,sha256=26PGL1eFncm0WfbgZjA7jaznfaRx75vVJnqbieVYeco,481
3
- dagster_snowflake/ops.py,sha256=L_MP28fLm7_hrJmzMoDocLwyvVnkpy1LVwUSLIArKWc,2225
4
- dagster_snowflake/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
5
- dagster_snowflake/resources.py,sha256=W9UQ1vvLStNWZfib7Yq-oidD_5ZkI0MtoeYCOQEqbAI,31183
6
- dagster_snowflake/snowflake_io_manager.py,sha256=V2_7V-xLiz856iTUDyxouQ6S9zg5DMpqseqSxXdnfjw,17205
7
- dagster_snowflake/version.py,sha256=pK8aUmHXhMGTRJ9g6PF60nsyauWvAxl-kjvZZup3fB8,24
8
- dagster_snowflake-0.24.13.dist-info/LICENSE,sha256=TMatHW4_G9ldRdodEAp-l2Xa2WvsdeOh60E3v1R2jis,11349
9
- dagster_snowflake-0.24.13.dist-info/METADATA,sha256=h1VNMNM5yPcRfqtEPaq2Yg1uBAOy_1ndhK4XM3saoRg,1121
10
- dagster_snowflake-0.24.13.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
11
- dagster_snowflake-0.24.13.dist-info/top_level.txt,sha256=uECYCiluOxLQ996SCUPBBwdK0CTyz45FjWqf7WDqMMc,18
12
- dagster_snowflake-0.24.13.dist-info/RECORD,,