Skip to content

Commit 922bf46

Browse files
Source Hubspot: fix for property_history stream (#13596)
* #259 on call: Source Hubspot - fix for the property_history stream which did not emit any records * #259 Source Hubspot: upd changelog * #259 oncall: hubspot review fixes * auto-bump connector version Co-authored-by: Octavia Squidington III <[email protected]>
1 parent 60f5f4c commit 922bf46

File tree

16 files changed

+627
-124
lines changed

16 files changed

+627
-124
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@
390390
- name: HubSpot
391391
sourceDefinitionId: 36c891d9-4bd9-43ac-bad2-10e12756272c
392392
dockerRepository: airbyte/source-hubspot
393-
dockerImageTag: 0.1.67
393+
dockerImageTag: 0.1.68
394394
documentationUrl: https://docs.airbyte.io/integrations/sources/hubspot
395395
icon: hubspot.svg
396396
sourceType: api

airbyte-config/init/src/main/resources/seed/source_specs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3633,7 +3633,7 @@
36333633
supportsNormalization: false
36343634
supportsDBT: false
36353635
supported_destination_sync_modes: []
3636-
- dockerImage: "airbyte/source-hubspot:0.1.67"
3636+
- dockerImage: "airbyte/source-hubspot:0.1.68"
36373637
spec:
36383638
documentationUrl: "https://docs.airbyte.io/integrations/sources/hubspot"
36393639
connectionSpecification:

airbyte-integrations/connectors/source-hubspot/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ COPY source_hubspot ./source_hubspot
3434
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
3535
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
3636

37-
LABEL io.airbyte.version=0.1.67
37+
LABEL io.airbyte.version=0.1.68
3838
LABEL io.airbyte.name=airbyte/source-hubspot

airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml

Lines changed: 20 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -18,88 +18,32 @@ tests:
1818
basic_read:
1919
- config_path: "secrets/config.json"
2020
timeout_seconds: 600
21-
configured_catalog_path: "sample_files/full_refresh_catalog.json"
22-
empty_streams: ["workflows", "form_submissions", "ticket_pipelines", "property_history"]
21+
configured_catalog_path: "sample_files/basic_read_catalog.json"
22+
empty_streams: ["workflows", "form_submissions", "ticket_pipelines"]
23+
expect_records:
24+
path: "integration_tests/expected_records.txt"
2325
- config_path: "secrets/config_oauth.json"
2426
timeout_seconds: 600
25-
configured_catalog_path: "sample_files/configured_catalog_for_oauth_config.json"
26-
# The `campaigns` stream is empty in this case, because we use a catalog with
27-
# incremental streams: subscription_changes and email_events (it takes a long time to read)
28-
# and therefore the start date is set at 2021-10-10 for `config_oauth.json`,
29-
# but the campaign was created on 2021-01-11
30-
empty_streams: ["campaigns", "workflows", "contacts_list_memberships", "form_submissions", "ticket_pipelines", "property_history"]
27+
configured_catalog_path: "sample_files/basic_read_oauth_catalog.json"
28+
empty_streams: ["workflows", "contacts_list_memberships", "form_submissions", "ticket_pipelines"]
29+
expect_records:
30+
path: "integration_tests/expected_records.txt"
3131
incremental:
3232
- config_path: "secrets/config.json"
33-
configured_catalog_path: "sample_files/configured_catalog.json"
33+
configured_catalog_path: "sample_files/incremental_catalog.json"
3434
future_state_path: "integration_tests/abnormal_state.json"
3535
full_refresh:
3636
- config_path: "secrets/config.json"
37+
# This config is the same as for basic read except for missing `property_history` stream.
38+
# This stream emits records with dynamic timestamps under some conditions
39+
# (properties like `hs_time_in_lead`, `hs_time_in_subscriber` etc.) which makes it impossible to compare records.
40+
# Ignoring these fields makes testing this stream senseless because those valuable values of other property types
41+
# will also be ignored. Instead, we test this stream against expected records in basic read test.
3742
configured_catalog_path: "sample_files/full_refresh_catalog.json"
38-
ignored_fields:
39-
"companies": ["properties", "hs_time_in_customer"]
40-
"companies": ["properties", "hs_time_in_evangelist"]
41-
"companies": ["properties", "hs_time_in_lead"]
42-
"companies": ["properties", "hs_time_in_marketingqualifiedlead"]
43-
"companies": ["properties", "hs_time_in_opportunity"]
44-
"companies": ["properties", "hs_time_in_other"]
45-
"companies": ["properties", "hs_time_in_salesqualifiedlead"]
46-
"companies": ["properties", "hs_time_in_subscriber"]
47-
"contacts": ["properties", "hs_time_in_customer"]
48-
"contacts": ["properties", "hs_time_in_evangelist"]
49-
"contacts": ["properties", "hs_time_in_lead"]
50-
"contacts": ["properties", "hs_time_in_marketingqualifiedlead"]
51-
"contacts": ["properties", "hs_time_in_opportunity"]
52-
"contacts": ["properties", "hs_time_in_other"]
53-
"contacts": ["properties", "hs_time_in_salesqualifiedlead"]
54-
"contacts": ["properties", "hs_time_in_subscriber"]
55-
"deals": ["properties", "hs_time_in_9567448"]
56-
"deals": ["properties", "hs_time_in_9567449"]
57-
"deals": ["properties", "hs_time_in_appointmentscheduled"]
58-
"deals": ["properties", "hs_time_in_closedlost"]
59-
"deals": ["properties", "hs_time_in_closedwon"]
60-
"deals": ["properties", "hs_time_in_contractsent"]
61-
"deals": ["properties", "hs_time_in_customclosedwonstage"]
62-
"deals": ["properties", "hs_time_in_decisionmakerboughtin"]
63-
"deals": ["properties", "hs_time_in_presentationscheduled"]
64-
"deals": ["properties", "hs_time_in_qualifiedtobuy"]
65-
"tickets": ["properties", "hs_time_in_1"]
66-
"tickets": ["properties", "hs_time_in_2"]
67-
"tickets": ["properties", "hs_time_in_3"]
68-
"tickets": ["properties", "hs_time_in_4"]
69-
"property_history": ["property", "hs_time_in_lead"]
70-
"property_history": ["property", "hs_time_in_subscriber"]
7143
- config_path: "secrets/config_oauth.json"
72-
configured_catalog_path: "sample_files/configured_catalog_for_oauth_config.json"
73-
ignored_fields:
74-
"companies": ["properties", "hs_time_in_customer"]
75-
"companies": ["properties", "hs_time_in_evangelist"]
76-
"companies": ["properties", "hs_time_in_lead"]
77-
"companies": ["properties", "hs_time_in_marketingqualifiedlead"]
78-
"companies": ["properties", "hs_time_in_opportunity"]
79-
"companies": ["properties", "hs_time_in_other"]
80-
"companies": ["properties", "hs_time_in_salesqualifiedlead"]
81-
"companies": ["properties", "hs_time_in_subscriber"]
82-
"contacts": ["properties", "hs_time_in_customer"]
83-
"contacts": ["properties", "hs_time_in_evangelist"]
84-
"contacts": ["properties", "hs_time_in_lead"]
85-
"contacts": ["properties", "hs_time_in_marketingqualifiedlead"]
86-
"contacts": ["properties", "hs_time_in_opportunity"]
87-
"contacts": ["properties", "hs_time_in_other"]
88-
"contacts": ["properties", "hs_time_in_salesqualifiedlead"]
89-
"contacts": ["properties", "hs_time_in_subscriber"]
90-
"deals": ["properties", "hs_time_in_9567448"]
91-
"deals": ["properties", "hs_time_in_9567449"]
92-
"deals": ["properties", "hs_time_in_appointmentscheduled"]
93-
"deals": ["properties", "hs_time_in_closedlost"]
94-
"deals": ["properties", "hs_time_in_closedwon"]
95-
"deals": ["properties", "hs_time_in_contractsent"]
96-
"deals": ["properties", "hs_time_in_customclosedwonstage"]
97-
"deals": ["properties", "hs_time_in_decisionmakerboughtin"]
98-
"deals": ["properties", "hs_time_in_presentationscheduled"]
99-
"deals": ["properties", "hs_time_in_qualifiedtobuy"]
100-
"tickets": ["properties", "hs_time_in_1"]
101-
"tickets": ["properties", "hs_time_in_2"]
102-
"tickets": ["properties", "hs_time_in_3"]
103-
"tickets": ["properties", "hs_time_in_4"]
104-
"property_history": ["property", "hs_time_in_lead"]
105-
"property_history": ["property", "hs_time_in_subscriber"]
44+
# This config is the same as for basic read except for missing `property_history` stream.
45+
# This stream emits records with dynamic timestamps under some conditions
46+
# (properties like `hs_time_in_lead`, `hs_time_in_subscriber` etc.) which makes it impossible to compare records.
47+
# Ignoring these fields makes testing this stream senseless because those valuable values of other property types
48+
# will also be ignored. Instead, we test this stream against expected records in basic read test.
49+
configured_catalog_path: "sample_files/full_refresh_oauth_catalog.json"

airbyte-integrations/connectors/source-hubspot/integration_tests/abnormal_state.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,8 @@
4949
},
5050
"tickets": {
5151
"updatedAt": "2221-10-12T13:37:56.412000+00:00"
52+
},
53+
"property_history": {
54+
"timestamp": 7966012325000
5255
}
5356
}

0 commit comments

Comments
 (0)