airbyte-source-shopify 2.6.6.dev202503182156__py3-none-any.whl → 2.7.0.dev202503201259__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.
- {airbyte_source_shopify-2.6.6.dev202503182156.dist-info → airbyte_source_shopify-2.7.0.dev202503201259.dist-info}/METADATA +1 -1
- {airbyte_source_shopify-2.6.6.dev202503182156.dist-info → airbyte_source_shopify-2.7.0.dev202503201259.dist-info}/RECORD +8 -8
- source_shopify/schemas/product_variants.json +4 -0
- source_shopify/shopify_graphql/bulk/job.py +2 -4
- source_shopify/shopify_graphql/bulk/query.py +17 -9
- source_shopify/streams/base_streams.py +1 -7
- {airbyte_source_shopify-2.6.6.dev202503182156.dist-info → airbyte_source_shopify-2.7.0.dev202503201259.dist-info}/WHEEL +0 -0
- {airbyte_source_shopify-2.6.6.dev202503182156.dist-info → airbyte_source_shopify-2.7.0.dev202503201259.dist-info}/entry_points.txt +0 -0
|
@@ -42,7 +42,7 @@ source_shopify/schemas/orders.json,sha256=DbipJlJqW2lzuGF2ce4JLRa4H491kVVAWBsoh8
|
|
|
42
42
|
source_shopify/schemas/pages.json,sha256=J7jxtk2nE_q-0oHmGz8orFq3EfSjJqUvF6qPJtiZCrg,2093
|
|
43
43
|
source_shopify/schemas/price_rules.json,sha256=aZ-Re9Oc9g0ci8SPn0_ufvKPsGDBcTaXHVsq_9-Ygq4,7004
|
|
44
44
|
source_shopify/schemas/product_images.json,sha256=0l3ACfOfnXz8N8oMHwvvfZUFKeeuZ2DlRRu5-FxUhaI,1760
|
|
45
|
-
source_shopify/schemas/product_variants.json,sha256=
|
|
45
|
+
source_shopify/schemas/product_variants.json,sha256=aTubzg5lhK52kyxzy_2pD1xOAkE4qOGgOoDUsbvOJY8,8400
|
|
46
46
|
source_shopify/schemas/products.json,sha256=n7m1ndEnAM7Pee5ca0JZWCl5Y0VffGmTZjqjHhiht1I,22609
|
|
47
47
|
source_shopify/schemas/shop.json,sha256=vEGiTvEYX7qnMq06MRVBycqih49h49xjTNC6gJuxTWs,8137
|
|
48
48
|
source_shopify/schemas/smart_collections.json,sha256=kv7dINsvgzJ0RyKfFNKjU0apdNDXwQaHfnNZfQsshcU,2009
|
|
@@ -51,19 +51,19 @@ source_shopify/schemas/transactions.json,sha256=vbwscH3UcAtbSsC70mBka4oNaFR4S3S6
|
|
|
51
51
|
source_shopify/scopes.py,sha256=UVDERXNismYSnRaXwUXcn8x7Z6EtoNKOHts0Vs_Kl2I,6443
|
|
52
52
|
source_shopify/shopify_graphql/bulk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
53
|
source_shopify/shopify_graphql/bulk/exceptions.py,sha256=4dj7Za4xIfwL-zf8joT9svF_RSoGlE3GviMiIl1e1rs,2532
|
|
54
|
-
source_shopify/shopify_graphql/bulk/job.py,sha256=
|
|
55
|
-
source_shopify/shopify_graphql/bulk/query.py,sha256=
|
|
54
|
+
source_shopify/shopify_graphql/bulk/job.py,sha256=UsYeXhjNJNHTv7su7p66rJ3BC5cNJkj3c9Iyuc2klbg,27535
|
|
55
|
+
source_shopify/shopify_graphql/bulk/query.py,sha256=4DtHwa5AaJyHP28EnqGdRH3TV68JyrN74yJmEfQehw0,124455
|
|
56
56
|
source_shopify/shopify_graphql/bulk/record.py,sha256=X6VGngugv7a_S8UEeDo121BkdCVLj5nWlHK76A21kyo,16898
|
|
57
57
|
source_shopify/shopify_graphql/bulk/retry.py,sha256=R5rSJJE8D5zcj6mN-OmmNO2aFZEIdjAlWclDDVW5KPI,2626
|
|
58
58
|
source_shopify/shopify_graphql/bulk/status.py,sha256=RmuQ2XsYL3iRCpVGxea9F1wXGmbwasDCSXjaTyL4LMA,328
|
|
59
59
|
source_shopify/shopify_graphql/bulk/tools.py,sha256=nUQ2ZmPTKJNJdfLToR6KJtLKcJFCChSifkAOvwg0Vss,4065
|
|
60
60
|
source_shopify/source.py,sha256=WmtSMHMop9NvREj0VUR6P8qWYWyv21y6rFk42bPBzAo,8445
|
|
61
61
|
source_shopify/spec.json,sha256=ITYWiQ-NrI5VISk5qmUQhp9ChUE2FV18d8xzVzPwvAg,6144
|
|
62
|
-
source_shopify/streams/base_streams.py,sha256=
|
|
62
|
+
source_shopify/streams/base_streams.py,sha256=UMbGFMDWVdkKR3d7-JkR5GbaIJVGaWiMpWnaWefWFNE,40491
|
|
63
63
|
source_shopify/streams/streams.py,sha256=UoWe89U5xfM2jdgCpWqRv5S4tXGM7GTMU0gq8nCr9oU,9618
|
|
64
64
|
source_shopify/transform.py,sha256=mn0htL812_90zc_YszGQa0hHcIZQpYYdmk8IqpZm5TI,4685
|
|
65
65
|
source_shopify/utils.py,sha256=CAEKcxIroBo6kRFCyvC1bfOyfbGy7Z7seqZB7Eekl44,14209
|
|
66
|
-
airbyte_source_shopify-2.
|
|
67
|
-
airbyte_source_shopify-2.
|
|
68
|
-
airbyte_source_shopify-2.
|
|
69
|
-
airbyte_source_shopify-2.
|
|
66
|
+
airbyte_source_shopify-2.7.0.dev202503201259.dist-info/METADATA,sha256=J1czuCYa9LmfwyNo3UxaA3VS8L9SPzQ7--kjQmUW-GQ,5325
|
|
67
|
+
airbyte_source_shopify-2.7.0.dev202503201259.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
68
|
+
airbyte_source_shopify-2.7.0.dev202503201259.dist-info/entry_points.txt,sha256=SyTwKSsPk9MCdPf01saWpnp8hcmZOgBssVcSIvMbBeQ,57
|
|
69
|
+
airbyte_source_shopify-2.7.0.dev202503201259.dist-info/RECORD,,
|
|
@@ -236,6 +236,10 @@
|
|
|
236
236
|
"tax_code": {
|
|
237
237
|
"description": "The tax code for the product variant.",
|
|
238
238
|
"type": ["null", "string"]
|
|
239
|
+
},
|
|
240
|
+
"tracked": {
|
|
241
|
+
"description": "Whether inventory levels are tracked for the item.",
|
|
242
|
+
"type": ["null", "boolean"]
|
|
239
243
|
}
|
|
240
244
|
}
|
|
241
245
|
}
|
|
@@ -246,8 +246,7 @@ class ShopifyBulkManager:
|
|
|
246
246
|
_, canceled_response = self.http_client.send_request(
|
|
247
247
|
http_method="POST",
|
|
248
248
|
url=self.base_url,
|
|
249
|
-
|
|
250
|
-
headers={"Content-Type": "application/graphql"},
|
|
249
|
+
json={"query": ShopifyBulkTemplates.cancel(self._job_id)},
|
|
251
250
|
request_kwargs={},
|
|
252
251
|
)
|
|
253
252
|
# mark the job was self-canceled
|
|
@@ -405,8 +404,7 @@ class ShopifyBulkManager:
|
|
|
405
404
|
_, response = self.http_client.send_request(
|
|
406
405
|
http_method="POST",
|
|
407
406
|
url=self.base_url,
|
|
408
|
-
|
|
409
|
-
headers={"Content-Type": "application/graphql"},
|
|
407
|
+
json={"query": ShopifyBulkTemplates.status(self._job_id)},
|
|
410
408
|
request_kwargs={},
|
|
411
409
|
)
|
|
412
410
|
self._job_healthcheck(response)
|
|
@@ -2652,7 +2652,15 @@ class ProductVariant(ShopifyBulkQuery):
|
|
|
2652
2652
|
Field(name="src", alias="image_src"),
|
|
2653
2653
|
Field(name="url", alias="image_url"),
|
|
2654
2654
|
]
|
|
2655
|
-
|
|
2655
|
+
measurement_fields = [
|
|
2656
|
+
Field(name="weight", fields=["value", "unit"]),
|
|
2657
|
+
]
|
|
2658
|
+
inventory_item_fields = [
|
|
2659
|
+
Field(name="id", alias="inventory_item_id"),
|
|
2660
|
+
Field(name="tracked", alias="tracked"),
|
|
2661
|
+
Field(name="requiresShipping", alias="requiresShipping"),
|
|
2662
|
+
Field(name="measurement", alias="measurement", fields=measurement_fields),
|
|
2663
|
+
]
|
|
2656
2664
|
query_nodes: List[Field] = [
|
|
2657
2665
|
"__typename",
|
|
2658
2666
|
"id",
|
|
@@ -2662,25 +2670,19 @@ class ProductVariant(ShopifyBulkQuery):
|
|
|
2662
2670
|
"position",
|
|
2663
2671
|
"inventoryPolicy",
|
|
2664
2672
|
"compareAtPrice",
|
|
2665
|
-
"inventoryManagement",
|
|
2666
2673
|
"createdAt",
|
|
2667
2674
|
"updatedAt",
|
|
2668
2675
|
"taxable",
|
|
2669
2676
|
"barcode",
|
|
2670
|
-
"weight",
|
|
2671
|
-
"weightUnit",
|
|
2672
2677
|
"inventoryQuantity",
|
|
2673
|
-
"requiresShipping",
|
|
2674
2678
|
"availableForSale",
|
|
2675
2679
|
"displayName",
|
|
2676
2680
|
"taxCode",
|
|
2677
2681
|
Field(name="selectedOptions", alias="options", fields=option_fields),
|
|
2678
|
-
Field(name="weight", alias="grams"),
|
|
2679
2682
|
Field(name="image", fields=image_fields),
|
|
2680
2683
|
Field(name="inventoryQuantity", alias="old_inventory_quantity"),
|
|
2681
2684
|
Field(name="product", fields=[Field(name="id", alias="product_id")]),
|
|
2682
|
-
Field(name="
|
|
2683
|
-
Field(name="inventoryItem", fields=[Field(name="id", alias="inventory_item_id")]),
|
|
2685
|
+
Field(name="inventoryItem", fields=inventory_item_fields),
|
|
2684
2686
|
] + presentment_prices
|
|
2685
2687
|
|
|
2686
2688
|
return query_nodes
|
|
@@ -2741,6 +2743,12 @@ class ProductVariant(ShopifyBulkQuery):
|
|
|
2741
2743
|
# unnest mandatory fields from their placeholders
|
|
2742
2744
|
record["product_id"] = self._unnest_and_resolve_id(record, "product", "product_id")
|
|
2743
2745
|
record["inventory_item_id"] = self._unnest_and_resolve_id(record, "inventoryItem", "inventory_item_id")
|
|
2746
|
+
inventory_item = record.get("inventoryItem")
|
|
2747
|
+
measurement_weight = record.get("inventoryItem", {}).get("measurement", {}).get("weight")
|
|
2748
|
+
record["weight"] = measurement_weight.get("value") if measurement_weight.get("value") else 0.0
|
|
2749
|
+
record["weight_unit"] = measurement_weight.get("unit") if measurement_weight else None
|
|
2750
|
+
record["tracked"] = inventory_item.get("tracked") if inventory_item else None
|
|
2751
|
+
record["requires_shipping"] = inventory_item.get("requiresShipping") if inventory_item else None
|
|
2744
2752
|
record["image_id"] = self._unnest_and_resolve_id(record, "image", "image_id")
|
|
2745
2753
|
image = record.get("image", {})
|
|
2746
2754
|
record["image_src"] = image.get("image_src") if image else None
|
|
@@ -2751,7 +2759,7 @@ class ProductVariant(ShopifyBulkQuery):
|
|
|
2751
2759
|
price = record.get("price")
|
|
2752
2760
|
record["price"] = float(price) if price else None
|
|
2753
2761
|
# cast the `grams` to integer
|
|
2754
|
-
record["grams"] = int(record.get("
|
|
2762
|
+
record["grams"] = int(record.get("weight", 0))
|
|
2755
2763
|
# convert date-time cursors
|
|
2756
2764
|
record["createdAt"] = self.tools.from_iso8601_to_rfc3339(record, "createdAt")
|
|
2757
2765
|
record["updatedAt"] = self.tools.from_iso8601_to_rfc3339(record, "updatedAt")
|
|
@@ -33,7 +33,7 @@ class ShopifyStream(HttpStream, ABC):
|
|
|
33
33
|
logger = logging.getLogger("airbyte")
|
|
34
34
|
|
|
35
35
|
# Latest Stable Release
|
|
36
|
-
api_version = "
|
|
36
|
+
api_version = "2025-01"
|
|
37
37
|
# Page size
|
|
38
38
|
limit = 250
|
|
39
39
|
|
|
@@ -80,12 +80,6 @@ class ShopifyStream(HttpStream, ABC):
|
|
|
80
80
|
params["order"] = f"{self.order_field} asc"
|
|
81
81
|
params[self.filter_field] = self.default_filter_field_value
|
|
82
82
|
return params
|
|
83
|
-
|
|
84
|
-
def backoff_time(self, response):
|
|
85
|
-
if response.status_code == 500:
|
|
86
|
-
return 10
|
|
87
|
-
else:
|
|
88
|
-
return super().backoff_time(response)
|
|
89
83
|
|
|
90
84
|
@limiter.balance_rate_limit()
|
|
91
85
|
def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]:
|
|
File without changes
|