port-ocean 0.27.2__py3-none-any.whl → 0.27.3__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.
- port_ocean/core/handlers/entity_processor/jq_entity_processor.py +3 -1
- port_ocean/core/handlers/port_app_config/models.py +1 -0
- port_ocean/tests/core/handlers/entity_processor/test_jq_entity_processor.py +1 -1
- {port_ocean-0.27.2.dist-info → port_ocean-0.27.3.dist-info}/METADATA +1 -1
- {port_ocean-0.27.2.dist-info → port_ocean-0.27.3.dist-info}/RECORD +8 -8
- {port_ocean-0.27.2.dist-info → port_ocean-0.27.3.dist-info}/LICENSE.md +0 -0
- {port_ocean-0.27.2.dist-info → port_ocean-0.27.3.dist-info}/WHEEL +0 -0
- {port_ocean-0.27.2.dist-info → port_ocean-0.27.3.dist-info}/entry_points.txt +0 -0
@@ -242,6 +242,7 @@ class JQEntityProcessor(BaseEntityProcessor):
|
|
242
242
|
data: dict[str, Any],
|
243
243
|
raw_entity_mappings: dict[str, Any],
|
244
244
|
items_to_parse: str | None,
|
245
|
+
items_to_parse_name: str,
|
245
246
|
selector_query: str,
|
246
247
|
parse_all: bool = False,
|
247
248
|
) -> tuple[list[MappedEntity], list[Exception]]:
|
@@ -255,7 +256,7 @@ class JQEntityProcessor(BaseEntityProcessor):
|
|
255
256
|
f" Skipping..."
|
256
257
|
)
|
257
258
|
return [], []
|
258
|
-
raw_data = [{
|
259
|
+
raw_data = [{items_to_parse_name: item, **data} for item in items]
|
259
260
|
|
260
261
|
entities, errors = await gather_and_split_errors_from_results(
|
261
262
|
[
|
@@ -304,6 +305,7 @@ class JQEntityProcessor(BaseEntityProcessor):
|
|
304
305
|
self._calculate_entity,
|
305
306
|
raw_entity_mappings,
|
306
307
|
mapping.port.items_to_parse,
|
308
|
+
mapping.port.items_to_parse_name,
|
307
309
|
mapping.selector.query,
|
308
310
|
parse_all,
|
309
311
|
)
|
@@ -39,6 +39,7 @@ class MappingsConfig(BaseModel):
|
|
39
39
|
class PortResourceConfig(BaseModel):
|
40
40
|
entity: MappingsConfig
|
41
41
|
items_to_parse: str | None = Field(alias="itemsToParse")
|
42
|
+
items_to_parse_name: str | None = Field(alias="itemsToParseName", default="item")
|
42
43
|
|
43
44
|
|
44
45
|
class Selector(BaseModel):
|
@@ -60,7 +60,7 @@ class TestJQEntityProcessor:
|
|
60
60
|
raw_entity_mappings = {"foo": ".foo"}
|
61
61
|
selector_query = '.foo == "bar"'
|
62
62
|
result, errors = await mocked_processor._calculate_entity(
|
63
|
-
data, raw_entity_mappings, None, selector_query
|
63
|
+
data, raw_entity_mappings, None, "item", selector_query
|
64
64
|
)
|
65
65
|
assert len(result) == 1
|
66
66
|
assert result[0].entity == {"foo": "bar"}
|
@@ -101,11 +101,11 @@ port_ocean/core/handlers/entities_state_applier/port/get_related_entities.py,sha
|
|
101
101
|
port_ocean/core/handlers/entities_state_applier/port/order_by_entities_dependencies.py,sha256=lyv6xKzhYfd6TioUgR3AVRSJqj7JpAaj1LxxU2xAqeo,1720
|
102
102
|
port_ocean/core/handlers/entity_processor/__init__.py,sha256=FvFCunFg44wNQoqlybem9MthOs7p1Wawac87uSXz9U8,156
|
103
103
|
port_ocean/core/handlers/entity_processor/base.py,sha256=PsnpNRqjHth9xwOvDRe7gKu8cjnVV0XGmTIHGvOelX0,1867
|
104
|
-
port_ocean/core/handlers/entity_processor/jq_entity_processor.py,sha256=
|
104
|
+
port_ocean/core/handlers/entity_processor/jq_entity_processor.py,sha256=qvPMbIH1XRvaZ-TvW7lw9k4W27ZPCHcXGSdqnZ0wblw,12970
|
105
105
|
port_ocean/core/handlers/port_app_config/__init__.py,sha256=8AAT5OthiVM7KCcM34iEgEeXtn2pRMrT4Dze5r1Ixbk,134
|
106
106
|
port_ocean/core/handlers/port_app_config/api.py,sha256=r_Th66NEw38IpRdnXZcRvI8ACfvxW_A6V62WLwjWXlQ,1044
|
107
107
|
port_ocean/core/handlers/port_app_config/base.py,sha256=Sup4-X_a7JGa27rMy_OgqGIjFHMlKBpKevicaK3AeHU,2919
|
108
|
-
port_ocean/core/handlers/port_app_config/models.py,sha256=
|
108
|
+
port_ocean/core/handlers/port_app_config/models.py,sha256=M9NJRRacvpZQYCFgHGlRwrdgumbIIJ82WpCyvtOUf5w,3019
|
109
109
|
port_ocean/core/handlers/queue/__init__.py,sha256=yzgicE_jAR1wtljFKxgyG6j-HbLcG_Zze5qw1kkALUI,171
|
110
110
|
port_ocean/core/handlers/queue/abstract_queue.py,sha256=SaivrYbqg8qsX6wtQlJZyxgcbdMD5B9NZG3byN9AvrI,782
|
111
111
|
port_ocean/core/handlers/queue/group_queue.py,sha256=JvvJOwz9z_aI4CjPr7yQX-0rOgqLI5wMdxWk2x5x-34,4989
|
@@ -168,7 +168,7 @@ port_ocean/tests/conftest.py,sha256=JXASSS0IY0nnR6bxBflhzxS25kf4iNaABmThyZ0mZt8,
|
|
168
168
|
port_ocean/tests/core/conftest.py,sha256=5shShx81LRuQTBwS2sDIjNJO2LSD6cUNz46SgNYzjGY,7686
|
169
169
|
port_ocean/tests/core/defaults/test_common.py,sha256=sR7RqB3ZYV6Xn6NIg-c8k5K6JcGsYZ2SCe_PYX5vLYM,5560
|
170
170
|
port_ocean/tests/core/handlers/entities_state_applier/test_applier.py,sha256=7XWgwUB9uVYRov4VbIz1A-7n2YLbHTTYT-4rKJxjB0A,10711
|
171
|
-
port_ocean/tests/core/handlers/entity_processor/test_jq_entity_processor.py,sha256=
|
171
|
+
port_ocean/tests/core/handlers/entity_processor/test_jq_entity_processor.py,sha256=TjSj8ssIqH23VJlO5PGovbudCqDbuE2-54iNQsD9K-I,14099
|
172
172
|
port_ocean/tests/core/handlers/mixins/test_live_events.py,sha256=6yUsYooBYchiZP_eYa8PN1IhiztJShBdPguoseyNMzY,12482
|
173
173
|
port_ocean/tests/core/handlers/mixins/test_sync_raw.py,sha256=-Jd2rUG63fZM8LuyKtCp1tt4WEqO2m5woESjs1c91sU,44428
|
174
174
|
port_ocean/tests/core/handlers/port_app_config/test_api.py,sha256=eJZ6SuFBLz71y4ca3DNqKag6d6HUjNJS0aqQPwiLMTI,1999
|
@@ -205,8 +205,8 @@ port_ocean/utils/repeat.py,sha256=U2OeCkHPWXmRTVoPV-VcJRlQhcYqPWI5NfmPlb1JIbc,32
|
|
205
205
|
port_ocean/utils/signal.py,sha256=mMVq-1Ab5YpNiqN4PkiyTGlV_G0wkUDMMjTZp5z3pb0,1514
|
206
206
|
port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
|
207
207
|
port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
|
208
|
-
port_ocean-0.27.
|
209
|
-
port_ocean-0.27.
|
210
|
-
port_ocean-0.27.
|
211
|
-
port_ocean-0.27.
|
212
|
-
port_ocean-0.27.
|
208
|
+
port_ocean-0.27.3.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
209
|
+
port_ocean-0.27.3.dist-info/METADATA,sha256=8q1fasdb2UPwIRETpBdDwk5m9IEDUOrBEBl5fSruMZ8,6887
|
210
|
+
port_ocean-0.27.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
211
|
+
port_ocean-0.27.3.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
|
212
|
+
port_ocean-0.27.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|