From e592edc60cafe0a837a263c40a072724872a43eb Mon Sep 17 00:00:00 2001 From: Nedhir Ebnou Date: Mon, 2 Dec 2024 18:17:25 +0100 Subject: [PATCH] update: configure Bullhorn Warehouse for incremental reading --- manifest.json | 12 ++++++------ .../v2/connectors/bullhorn/aisles.py | 11 +++++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/manifest.json b/manifest.json index 3735aaf6..827d2c69 100644 --- a/manifest.json +++ b/manifest.json @@ -81,7 +81,7 @@ "required": [], "$defs": {} }, - "supports_incremental": false, + "supports_incremental": true, "pull_parameters": { "title": "ReadCreatedJobsCriterias", "type": "object", @@ -818,7 +818,7 @@ "required": [], "$defs": {} }, - "supports_incremental": false, + "supports_incremental": true, "pull_parameters": { "title": "ReadUpdatedJobsCriterias", "type": "object", @@ -1550,7 +1550,7 @@ "required": [], "$defs": {} }, - "supports_incremental": false, + "supports_incremental": true, "pull_parameters": { "title": "ReadArchivedJobsCriterias", "type": "object", @@ -2374,7 +2374,7 @@ } } }, - "supports_incremental": false, + "supports_incremental": true, "pull_parameters": { "title": "ReadCreatedProfilesCriterias", "type": "object", @@ -3669,7 +3669,7 @@ } } }, - "supports_incremental": false, + "supports_incremental": true, "pull_parameters": { "title": "ReadUpdatedProfilesCriterias", "type": "object", @@ -4979,7 +4979,7 @@ } } }, - "supports_incremental": false, + "supports_incremental": true, "pull_parameters": { "title": "ReadArchivedProfilesCriterias", "type": "object", diff --git a/src/hrflow_connectors/v2/connectors/bullhorn/aisles.py b/src/hrflow_connectors/v2/connectors/bullhorn/aisles.py index b4b505e8..19a5ea85 100644 --- a/src/hrflow_connectors/v2/connectors/bullhorn/aisles.py +++ b/src/hrflow_connectors/v2/connectors/bullhorn/aisles.py @@ -18,6 +18,7 @@ from hrflow_connectors.v2.core.warehouse import ( Aisle, Criterias, + IncrementalTokenHandler, ReadOperation, WriteOperation, merge, @@ -965,6 +966,11 @@ def item_to_read_from_update_or_archive(item: dict) -> str: update=ReadUpdatedProfilesCriterias, archive=ReadArchivedProfilesCriterias, ), + incremental_token_handler=IncrementalTokenHandler( + create=item_to_read_from_create, + update=item_to_read_from_update_or_archive, + archive=item_to_read_from_update_or_archive, + ), ), schema=BullhornProfile, ) @@ -982,6 +988,11 @@ def item_to_read_from_update_or_archive(item: dict) -> str: update=ReadUpdatedJobsCriterias, archive=ReadArchivedJobsCriterias, ), + incremental_token_handler=IncrementalTokenHandler( + create=item_to_read_from_create, + update=item_to_read_from_update_or_archive, + archive=item_to_read_from_update_or_archive, + ), ), schema=BullhornJob, )