Skip to content

Commit

Permalink
State as start date
Browse files Browse the repository at this point in the history
The format of the start date in configuration file and the state is completely different. Addressing the difference will make the incremental runs possible.
  • Loading branch information
Daniela Angelova committed Feb 7, 2025
1 parent 11fb0c2 commit cd79602
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions tap_hubspot/marketing_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ def get_url_params(
start_replication_key_value = self.get_starting_replication_key_value(context)

if start_replication_key_value:
start_date = str(int(datetime.timestamp(datetime.strptime(start_replication_key_value, '%Y-%m-%dT%H:%M:%SZ')))) + '000'
params["startTimestamp"] = start_date
start_date = start_replication_key_value
if type(start_date) == str:
start_date = str(int(datetime.timestamp(datetime.strptime(start_replication_key_value, '%Y-%m-%dT%H:%M:%SZ')))) + '000'
params["startTimestamp"] = start_date

end_date = self.config.get("end_date")
if end_date:
Expand Down
2 changes: 1 addition & 1 deletion tap_hubspot/schemas/email_events.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": ["null","string"]
},
"created": {
"type": ["null","string"]
"type": ["null","integer"]
},
"emailCampaignId": {
"type": ["null","integer"]
Expand Down

0 comments on commit cd79602

Please sign in to comment.