unstructured-ingest 1.0.12__py3-none-any.whl → 1.0.13__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 unstructured-ingest might be problematic. Click here for more details.

@@ -1 +1 @@
1
- __version__ = "1.0.12" # pragma: no cover
1
+ __version__ = "1.0.13" # pragma: no cover
@@ -56,6 +56,12 @@ class IbmWatsonxConnectionConfig(ConnectionConfig):
56
56
  object_storage_endpoint: str = Field(description="Cloud Object Storage public endpoint")
57
57
  object_storage_region: str = Field(description="Cloud Object Storage region")
58
58
  catalog: str = Field(description="Catalog name")
59
+ max_retries_connection: int = Field(
60
+ default=10,
61
+ description="Maximum number of retries in case of a connection error (RESTError)",
62
+ ge=2,
63
+ le=100,
64
+ )
59
65
 
60
66
  _bearer_token: Optional[dict[str, Any]] = None
61
67
 
@@ -145,10 +151,29 @@ class IbmWatsonxConnectionConfig(ConnectionConfig):
145
151
  @contextmanager
146
152
  def get_catalog(self) -> Generator["RestCatalog", None, None]:
147
153
  from pyiceberg.catalog import load_catalog
154
+ from pyiceberg.exceptions import RESTError
155
+ from tenacity import (
156
+ before_log,
157
+ retry,
158
+ retry_if_exception_type,
159
+ stop_after_attempt,
160
+ wait_exponential,
161
+ )
162
+
163
+ # Retry connection in case of a connection error
164
+ @retry(
165
+ stop=stop_after_attempt(self.max_retries_connection),
166
+ wait=wait_exponential(exp_base=2, multiplier=1, min=2, max=10),
167
+ retry=retry_if_exception_type(RESTError),
168
+ before=before_log(logger, logging.DEBUG),
169
+ reraise=True,
170
+ )
171
+ def _get_catalog(catalog_config: dict[str, Any]) -> "RestCatalog":
172
+ return load_catalog(**catalog_config)
148
173
 
149
174
  try:
150
175
  catalog_config = self.get_catalog_config()
151
- catalog = load_catalog(**catalog_config)
176
+ catalog = _get_catalog(catalog_config)
152
177
  except Exception as e:
153
178
  logger.error(f"Failed to connect to catalog '{self.catalog}': {e}", exc_info=True)
154
179
  raise ProviderError(f"Failed to connect to catalog '{self.catalog}': {e}")
@@ -172,7 +197,10 @@ class IbmWatsonxUploaderConfig(UploaderConfig):
172
197
  namespace: str = Field(description="Namespace name")
173
198
  table: str = Field(description="Table name")
174
199
  max_retries: int = Field(
175
- default=5, description="Maximum number of retries to upload data", ge=2, le=500
200
+ default=50,
201
+ description="Maximum number of retries to upload data (CommitFailedException)",
202
+ ge=2,
203
+ le=500,
176
204
  )
177
205
  record_id_key: str = Field(
178
206
  default=RECORD_ID_LABEL,
@@ -287,15 +315,15 @@ class IbmWatsonxUploader(SQLUploader):
287
315
  retry,
288
316
  retry_if_exception_type,
289
317
  stop_after_attempt,
290
- wait_random,
318
+ wait_exponential,
291
319
  )
292
320
 
293
321
  data_table = self._df_to_arrow_table(df)
294
322
 
295
- # Retry connection in case of connection error
323
+ # Retry connection in case of a connection error or token expiration
296
324
  @retry(
297
- stop=stop_after_attempt(2),
298
- wait=wait_random(),
325
+ stop=stop_after_attempt(self.connection_config.max_retries_connection),
326
+ wait=wait_exponential(exp_base=2, multiplier=1, min=2, max=10),
299
327
  retry=retry_if_exception_type(RESTError),
300
328
  before=before_log(logger, logging.DEBUG),
301
329
  reraise=True,
@@ -38,6 +38,7 @@ class Select(DBPropertyBase):
38
38
  id: str
39
39
  name: str
40
40
  select: SelectProp
41
+ description: Optional[str] = None
41
42
  type: str = "select"
42
43
 
43
44
  @classmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unstructured_ingest
3
- Version: 1.0.12
3
+ Version: 1.0.13
4
4
  Summary: Local ETL data pipeline to get data RAG ready
5
5
  Author-email: Unstructured Technologies <devops@unstructuredai.io>
6
6
  License-Expression: Apache-2.0
@@ -1,5 +1,5 @@
1
1
  unstructured_ingest/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
2
- unstructured_ingest/__version__.py,sha256=lMbQ0529QKJjjQ_kL1MFTpMu0sLuz_HYCDQvQiNQRtc,43
2
+ unstructured_ingest/__version__.py,sha256=699bwiNA-eOPRKD6w4CsZQiq8SnTP9t_VAkbFCvGi0g,43
3
3
  unstructured_ingest/error.py,sha256=qDncnJgbf5ils956RcO2CGlAKYDT5OaEM9Clv1JVTNc,1448
4
4
  unstructured_ingest/errors_v2.py,sha256=9RuRCi7lbDxCguDz07y5RiHoQiFIOWwOD7xqzJ2B3Yw,436
5
5
  unstructured_ingest/logger.py,sha256=7e_7UeK6hVOd5BQ6i9NzRUAPCS_DF839Y8TjUDywraY,1428
@@ -115,7 +115,7 @@ unstructured_ingest/processes/connectors/fsspec/s3.py,sha256=2ZV6b2E2pIsf_ab1Lty
115
115
  unstructured_ingest/processes/connectors/fsspec/sftp.py,sha256=pR_a2SgLjt8ffNkariHrPB1E0HVSTj5h3pt7KxTU3TI,6371
116
116
  unstructured_ingest/processes/connectors/fsspec/utils.py,sha256=jec_Qfe2hbfahBuY-u8FnvHuv933AI5HwPFjOL3kEEY,456
117
117
  unstructured_ingest/processes/connectors/ibm_watsonx/__init__.py,sha256=kf0UpgdAY2KK1R1FbAB6GEBBAIOeYQ8cZIr3bp660qM,374
118
- unstructured_ingest/processes/connectors/ibm_watsonx/ibm_watsonx_s3.py,sha256=TOZxk6TUY_iOlitZQbFi-R5LcQmAMyOraWx98E6bzhg,12748
118
+ unstructured_ingest/processes/connectors/ibm_watsonx/ibm_watsonx_s3.py,sha256=NeWLjAAFd7h4GMvVUh92LktbTc6Dnvet42mzju9F0yg,13818
119
119
  unstructured_ingest/processes/connectors/kafka/__init__.py,sha256=pFN2cWwAStiGTAsQ616GIWKi_hDv0s74ZvNqhJEp1Pc,751
120
120
  unstructured_ingest/processes/connectors/kafka/cloud.py,sha256=Ki6iOLoZ86tYWdnLnMWYvb2hUCneKqo4mTJcfXh7YoQ,3432
121
121
  unstructured_ingest/processes/connectors/kafka/kafka.py,sha256=7NMvWijfoliyAgnmz8TM8oJt5x7RDzC-ABPdYAm7J3w,10306
@@ -191,7 +191,7 @@ unstructured_ingest/processes/connectors/notion/types/database_properties/phone_
191
191
  unstructured_ingest/processes/connectors/notion/types/database_properties/relation.py,sha256=e4zQmjtP2w1RNfKDaWu2-AOhwjM_QP_TrjyxAQUnpN4,1528
192
192
  unstructured_ingest/processes/connectors/notion/types/database_properties/rich_text.py,sha256=EeWvzLx9zYT3crH_eshAOf1L60k5gMqJUqQGiI-is7c,1171
193
193
  unstructured_ingest/processes/connectors/notion/types/database_properties/rollup.py,sha256=xyaA2yIvDfe-tu_TXi6ZjCz2jCawFS2DVKvfSr-nxjQ,1277
194
- unstructured_ingest/processes/connectors/notion/types/database_properties/select.py,sha256=wF-V5JKzi4y3i1-eE6kXQWeSbqYo33D1LXdXJIpTkyM,1756
194
+ unstructured_ingest/processes/connectors/notion/types/database_properties/select.py,sha256=Qy-t9kmJq5cZKohxNX2DbvIftX95CvDX6JMDVWzVYl4,1794
195
195
  unstructured_ingest/processes/connectors/notion/types/database_properties/status.py,sha256=GneqbmGaBqOecoApH6I4YWf5flvuVk2m5wMJrRw7Nvo,2044
196
196
  unstructured_ingest/processes/connectors/notion/types/database_properties/title.py,sha256=4Tnfxxx_Nr-Wkwd7urotp1xTGO9itWe8qI3OnfooLrE,1023
197
197
  unstructured_ingest/processes/connectors/notion/types/database_properties/unique_id.py,sha256=i95msSj2-l3yG8tw02dIChADDEy695MWmNWXJq0jGD4,1173
@@ -231,8 +231,8 @@ unstructured_ingest/utils/ndjson.py,sha256=nz8VUOPEgAFdhaDOpuveknvCU4x82fVwqE01q
231
231
  unstructured_ingest/utils/pydantic_models.py,sha256=BT_j15e4rX40wQbt8LUXbqfPhA3rJn1PHTI_G_A_EHY,1720
232
232
  unstructured_ingest/utils/string_and_date_utils.py,sha256=oXOI6rxXq-8ncbk7EoJK0WCcTXWj75EzKl8pfQMID3U,2522
233
233
  unstructured_ingest/utils/table.py,sha256=WZechczgVFvlodUWFcsnCGvBNh1xRm6hr0VbJTPxKAc,3669
234
- unstructured_ingest-1.0.12.dist-info/METADATA,sha256=sliUV6p8Zt44PisJ-euZ06l18iPea1V9-UOU6uPGj-4,8720
235
- unstructured_ingest-1.0.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
236
- unstructured_ingest-1.0.12.dist-info/entry_points.txt,sha256=gUAAFnjFPnBgThJSEbw0N5ZjxtaKlT1s9e05_arQrNw,70
237
- unstructured_ingest-1.0.12.dist-info/licenses/LICENSE.md,sha256=SxkKP_62uIAKb9mb1eH7FH4Kn2aYT09fgjKpJt5PyTk,11360
238
- unstructured_ingest-1.0.12.dist-info/RECORD,,
234
+ unstructured_ingest-1.0.13.dist-info/METADATA,sha256=hZzFMEM3VU6hSkAk6QN8QviuCh3wjjRcpzYbsvWFL5w,8720
235
+ unstructured_ingest-1.0.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
236
+ unstructured_ingest-1.0.13.dist-info/entry_points.txt,sha256=gUAAFnjFPnBgThJSEbw0N5ZjxtaKlT1s9e05_arQrNw,70
237
+ unstructured_ingest-1.0.13.dist-info/licenses/LICENSE.md,sha256=SxkKP_62uIAKb9mb1eH7FH4Kn2aYT09fgjKpJt5PyTk,11360
238
+ unstructured_ingest-1.0.13.dist-info/RECORD,,