Skip to content

Commit

Permalink
Source HubSpot: Convert to int only numeric values (#24641)
Browse files Browse the repository at this point in the history
* Source HubSpot: Convert to int only numeric values

* Source HubSpot: update docs

* Source HubSpot: update docs

* Source HubSpot: fix email events schema

* Source Hubspot: Fix test

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
artem1205 and octavia-squidington-iii authored Mar 30, 2023
1 parent 8bb84f2 commit 0b156a8
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@
- name: HubSpot
sourceDefinitionId: 36c891d9-4bd9-43ac-bad2-10e12756272c
dockerRepository: airbyte/source-hubspot
dockerImageTag: 0.3.3
dockerImageTag: 0.3.4
documentationUrl: https://docs.airbyte.com/integrations/sources/hubspot
icon: hubspot.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6799,7 +6799,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-hubspot:0.3.3"
- dockerImage: "airbyte/source-hubspot:0.3.4"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/hubspot"
connectionSpecification:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-hubspot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ COPY source_hubspot ./source_hubspot
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.3.3
LABEL io.airbyte.version=0.3.4
LABEL io.airbyte.name=airbyte/source-hubspot
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ acceptance_tests:
discovery:
tests:
- config_path: secrets/config_oauth.json
backward_compatibility_tests_config:
disable_for_version: 0.3.3
basic_read:
tests:
- config_path: secrets/config_oauth.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
"type": ["null", "string"]
},
"version": {
"type": ["null", "array"],
"items": {
"type": ["null", "string"]
}
"type": ["null", "string"]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def _cast_value(cls, declared_field_types: List, field_name: str, field_value: A

if target_type_name == "number":
# do not cast numeric IDs into float, use integer instead
target_type = int if field_name.endswith("_id") else target_type
target_type = int if field_value.isnumeric() else target_type
field_value = field_value.replace(",", "")

if target_type_name != "string" and field_value == "":
Expand All @@ -467,7 +467,7 @@ def _cast_value(cls, declared_field_types: List, field_name: str, field_value: A
try:
casted_value = target_type(field_value)
except ValueError:
logger.exception(f"Could not cast `{field_value}` to `{target_type}`")
logger.exception(f"Could not cast in stream `{cls.__name__}` `{field_name}` {field_value=} to `{target_type}`")
return field_value

return casted_value
Expand Down
2 changes: 1 addition & 1 deletion connectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
| **Harness** | <img alt="Harness icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/harness.svg" height="30" height="30"/> | Source | farosai/airbyte-harness-source:0.1.23 | alpha | [link](https://docs.airbyte.com/integrations/sources/harness) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/airbyte-harness-source) | <small>`6fe89830-d04d-401b-aad6-6552ffa5c4af`</small> |
| **Harvest** | <img alt="Harvest icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/harvest.svg" height="30" height="30"/> | Source | airbyte/source-harvest:0.1.16 | generally_available | [link](https://docs.airbyte.com/integrations/sources/harvest) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-harvest) | <small>`fe2b4084-3386-4d3b-9ad6-308f61a6f1e6`</small> |
| **Hellobaton** | <img alt="Hellobaton icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/hellobaton.svg" height="30" height="30"/> | Source | airbyte/source-hellobaton:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/hellobaton) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-hellobaton) | <small>`492b56d1-937c-462e-8076-21ad2031e784`</small> |
| **HubSpot** | <img alt="HubSpot icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/hubspot.svg" height="30" height="30"/> | Source | airbyte/source-hubspot:0.3.3 | generally_available | [link](https://docs.airbyte.com/integrations/sources/hubspot) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-hubspot) | <small>`36c891d9-4bd9-43ac-bad2-10e12756272c`</small> |
| **HubSpot** | <img alt="HubSpot icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/hubspot.svg" height="30" height="30"/> | Source | airbyte/source-hubspot:0.3.4 | generally_available | [link](https://docs.airbyte.com/integrations/sources/hubspot) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-hubspot) | <small>`36c891d9-4bd9-43ac-bad2-10e12756272c`</small> |
| **Hubplanner** | <img alt="Hubplanner icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/hubplanner.svg" height="30" height="30"/> | Source | airbyte/source-hubplanner:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/hubplanner) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-hubplanner) | <small>`8097ceb9-383f-42f6-9f92-d3fd4bcc7689`</small> |
| **IBM Db2** | <img alt="IBM Db2 icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/db2.svg" height="30" height="30"/> | Source | airbyte/source-db2:0.1.19 | alpha | [link](https://docs.airbyte.com/integrations/sources/db2) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-db2) | <small>`447e0381-3780-4b46-bb62-00a4e3c8b8e2`</small> |
| **IP2Whois** | <img alt="IP2Whois icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/ip2whois.svg" height="30" height="30"/> | Source | airbyte/source-ip2whois:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/ip2whois) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-ip2whois) | <small>`f23b7b7c-d705-49a3-9042-09add3b104a5`</small> |
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/hubspot.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Now that you have set up the Hubspot source connector, check out the following H

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|
| 0.3.4 | 2023-03-28 | [24641](https://github.com/airbytehq/airbyte/pull/24641) | Convert to int only numeric values |
| 0.3.3 | 2023-03-27 | [24591](https://github.com/airbytehq/airbyte/pull/24591) | Fix pagination for `marketing emails` stream |
| 0.3.2 | 2023-02-07 | [22479](https://github.com/airbytehq/airbyte/pull/22479) | Turn on default HttpAvailabilityStrategy |
| 0.3.1 | 2023-01-27 | [22009](https://github.com/airbytehq/airbyte/pull/22009) | Set `AvailabilityStrategy` for streams explicitly to `None` |
Expand Down

0 comments on commit 0b156a8

Please sign in to comment.