airbyte-source-shopify 3.0.8.dev202509081459__py3-none-any.whl → 3.0.9__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-source-shopify
3
- Version: 3.0.8.dev202509081459
3
+ Version: 3.0.9
4
4
  Summary: Source CDK implementation for Shopify.
5
5
  Home-page: https://airbyte.com
6
6
  License: ELv2
@@ -52,7 +52,7 @@ source_shopify/schemas/transactions.json,sha256=vbwscH3UcAtbSsC70mBka4oNaFR4S3S6
52
52
  source_shopify/scopes.py,sha256=N0njfMHn3Q1AQXuTj5VfjQOio10jaDarpC_oLYnWvqc,6490
53
53
  source_shopify/shopify_graphql/bulk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  source_shopify/shopify_graphql/bulk/exceptions.py,sha256=4dj7Za4xIfwL-zf8joT9svF_RSoGlE3GviMiIl1e1rs,2532
55
- source_shopify/shopify_graphql/bulk/job.py,sha256=qSd1EAVAjOazPRHc7G48OJJao3xqF9foKqxD0pIWick,28192
55
+ source_shopify/shopify_graphql/bulk/job.py,sha256=c3Cg70_Io9jTD-rU-5MvjHaPmJCtcpeqEYnRtFECGOo,28673
56
56
  source_shopify/shopify_graphql/bulk/query.py,sha256=D8rnI1SDw50-Gt18lt7YwwNNdsbVMbBfxZa9xVJZbto,130981
57
57
  source_shopify/shopify_graphql/bulk/record.py,sha256=X6VGngugv7a_S8UEeDo121BkdCVLj5nWlHK76A21kyo,16898
58
58
  source_shopify/shopify_graphql/bulk/retry.py,sha256=R5rSJJE8D5zcj6mN-OmmNO2aFZEIdjAlWclDDVW5KPI,2626
@@ -60,11 +60,11 @@ source_shopify/shopify_graphql/bulk/status.py,sha256=RmuQ2XsYL3iRCpVGxea9F1wXGmb
60
60
  source_shopify/shopify_graphql/bulk/tools.py,sha256=nUQ2ZmPTKJNJdfLToR6KJtLKcJFCChSifkAOvwg0Vss,4065
61
61
  source_shopify/source.py,sha256=txb3wIm-3xXd8-5QLSeu2TeHBSnppwy5PEIOEl40mVw,8517
62
62
  source_shopify/spec.json,sha256=ITYWiQ-NrI5VISk5qmUQhp9ChUE2FV18d8xzVzPwvAg,6144
63
- source_shopify/streams/base_streams.py,sha256=j3x38czi13KgvDuP7oHmfTClDr9S6Jfh_r-J97BF9Iw,42322
64
- source_shopify/streams/streams.py,sha256=D70Ik1vU75NKlmJMnS7W2-5gApA2ANq9eRnKligMTNw,14555
63
+ source_shopify/streams/base_streams.py,sha256=k_4uLaLADLRTUcSmP8uA_830uuzRvnqUaCVGcb0Zpd8,42625
64
+ source_shopify/streams/streams.py,sha256=YV1JAuD8SmGDmrt6QOgGgC8hA43ijb6ltgv11OJPBxA,14696
65
65
  source_shopify/transform.py,sha256=mn0htL812_90zc_YszGQa0hHcIZQpYYdmk8IqpZm5TI,4685
66
66
  source_shopify/utils.py,sha256=DSqEchu-MQJ7zust7CNfqOkGIv9OSR-5UUsuD-bsDa8,16224
67
- airbyte_source_shopify-3.0.8.dev202509081459.dist-info/METADATA,sha256=GUfH4CzDOyfH0Afvotv0IHmYcTGXCwoq44UpHficGHE,5313
68
- airbyte_source_shopify-3.0.8.dev202509081459.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
69
- airbyte_source_shopify-3.0.8.dev202509081459.dist-info/entry_points.txt,sha256=SyTwKSsPk9MCdPf01saWpnp8hcmZOgBssVcSIvMbBeQ,57
70
- airbyte_source_shopify-3.0.8.dev202509081459.dist-info/RECORD,,
67
+ airbyte_source_shopify-3.0.9.dist-info/METADATA,sha256=6g4Br1KbCijCFCy4wVN6t-L_i_3HRIND7-HxTa_iftg,5297
68
+ airbyte_source_shopify-3.0.9.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
69
+ airbyte_source_shopify-3.0.9.dist-info/entry_points.txt,sha256=SyTwKSsPk9MCdPf01saWpnp8hcmZOgBssVcSIvMbBeQ,57
70
+ airbyte_source_shopify-3.0.9.dist-info/RECORD,,
@@ -531,9 +531,14 @@ class ShopifyBulkManager:
531
531
  self, slice_end: datetime, checkpointed_cursor: Optional[str] = None, filter_checkpointed_cursor: Optional[str] = None
532
532
  ) -> datetime:
533
533
  """
534
- Choose between the existing `slice_end` value or `checkpointed_cursor` value, if provided.
534
+ Choose between the existing `slice_end` value or `checkpointed_cursor` value or `filter_checkpointed_cursor` value, if provided.
535
535
 
536
536
  Optionally: raises the `transient` error if the checkpoint collision occurs.
537
+
538
+ Note: filter_checkpointed_cursor is only used when cursor field is ID for streams like Customer Address etc.
539
+ This method should return a datetime from last checkpointed value to adjust slice end, when cursor value is ID (int type)
540
+ method gets end datetime from filter_checkpointed_cursor, which is value from filter field from last record.
541
+ See https://github.com/airbytehq/oncall/issues/9052 for more details.
537
542
  """
538
543
 
539
544
  if checkpointed_cursor:
@@ -222,6 +222,11 @@ class IncrementalShopifyStream(ShopifyStream, ABC):
222
222
  return params
223
223
 
224
224
  def track_checkpoint_cursor(self, record_value: Union[str, int], filter_record_value: Optional[str] = None) -> None:
225
+ """
226
+ Tracks _checkpoint_cursor value (values from cursor field) and _filter_checkpointed_cursor value (value from filter field).
227
+ _filter_checkpointed_cursor value is only used when cursor field is ID for streams like Customer Address etc.
228
+ When after canceled/failed job source tries to adjust stream slice (see ShopifyBulkManager._adjust_slice_end()).
229
+ """
225
230
  if self.filter_by_state_checkpoint:
226
231
  # set checkpoint cursor
227
232
  if not self._checkpoint_cursor:
@@ -231,9 +236,7 @@ class IncrementalShopifyStream(ShopifyStream, ABC):
231
236
  self._checkpoint_cursor = record_value
232
237
 
233
238
  if filter_record_value:
234
- if not self._filter_checkpointed_cursor:
235
- self._filter_checkpointed_cursor = filter_record_value
236
- if str(filter_record_value) >= str(self._filter_checkpointed_cursor):
239
+ if not self._filter_checkpointed_cursor or str(filter_record_value) >= str(self._filter_checkpointed_cursor):
237
240
  self._filter_checkpointed_cursor = filter_record_value
238
241
 
239
242
  def should_checkpoint(self, index: int) -> bool:
@@ -4,6 +4,7 @@
4
4
 
5
5
 
6
6
  import logging
7
+ import sys
7
8
  from typing import Any, Iterable, Mapping, MutableMapping, Optional
8
9
 
9
10
  import requests
@@ -138,6 +139,12 @@ class MetafieldProducts(IncrementalShopifyGraphQlBulkStream):
138
139
  parent_stream_class = Products
139
140
  bulk_query: MetafieldProduct = MetafieldProduct
140
141
 
142
+ state_checkpoint_interval = sys.maxsize
143
+
144
+ @property
145
+ def filter_by_state_checkpoint(self) -> bool:
146
+ return True
147
+
141
148
 
142
149
  class ProductImages(IncrementalShopifyGraphQlBulkStream):
143
150
  parent_stream_class = Products