diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index e665b3d04391..f855aacfd66a 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -390,7 +390,7 @@ - name: HubSpot sourceDefinitionId: 36c891d9-4bd9-43ac-bad2-10e12756272c dockerRepository: airbyte/source-hubspot - dockerImageTag: 0.1.59 + dockerImageTag: 0.1.60 documentationUrl: https://docs.airbyte.io/integrations/sources/hubspot icon: hubspot.svg sourceType: api diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index dc4292b4b9df..941f1e58fc03 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -3549,7 +3549,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-hubspot:0.1.59" +- dockerImage: "airbyte/source-hubspot:0.1.60" spec: documentationUrl: "https://docs.airbyte.io/integrations/sources/hubspot" connectionSpecification: diff --git a/airbyte-integrations/connectors/source-hubspot/Dockerfile b/airbyte-integrations/connectors/source-hubspot/Dockerfile index 8e61ae2aae27..08d11cd60584 100644 --- a/airbyte-integrations/connectors/source-hubspot/Dockerfile +++ b/airbyte-integrations/connectors/source-hubspot/Dockerfile @@ -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.1.59 +LABEL io.airbyte.version=0.1.60 LABEL io.airbyte.name=airbyte/source-hubspot diff --git a/airbyte-integrations/connectors/source-hubspot/source_hubspot/streams.py b/airbyte-integrations/connectors/source-hubspot/source_hubspot/streams.py index 913676f8e6da..482ab432cba7 100644 --- a/airbyte-integrations/connectors/source-hubspot/source_hubspot/streams.py +++ b/airbyte-integrations/connectors/source-hubspot/source_hubspot/streams.py @@ -372,7 +372,7 @@ def _convert_datetime_to_string(dt: pendulum.datetime, declared_format: str = No if declared_format == "date": return dt.to_date_string() elif declared_format == "date-time": - return dt.to_datetime_string() + return dt.to_rfc3339_string() @classmethod def _cast_datetime(cls, field_name: str, field_value: Any, declared_format: str = None) -> Any: @@ -1282,7 +1282,7 @@ def _transform(self, records: Iterable) -> Iterable: continue if versions: for version in versions: - version["timestamp"] = self._field_to_datetime(version["timestamp"]).to_datetime_string() + version["timestamp"] = self._field_to_datetime(version["timestamp"]).to_rfc3339_string() version["property"] = key version["vid"] = vid yield version diff --git a/airbyte-integrations/connectors/source-hubspot/unit_tests/test_field_type_converting.py b/airbyte-integrations/connectors/source-hubspot/unit_tests/test_field_type_converting.py index bf185671513a..66fb1376192a 100644 --- a/airbyte-integrations/connectors/source-hubspot/unit_tests/test_field_type_converting.py +++ b/airbyte-integrations/connectors/source-hubspot/unit_tests/test_field_type_converting.py @@ -73,7 +73,7 @@ def test_bad_field_type_converting(field_type, expected, caplog, capsys): # Test casting fields with format specified (["null", "string"], "some_field", "", "date-time", None), (["string"], "some_field", "", "date-time", ""), - (["null", "string"], "some_field", "2020", "date-time", "2020-01-01 00:00:00"), + (["null", "string"], "some_field", "2020", "date-time", "2020-01-01T00:00:00+00:00"), ], ) def test_cast_type_if_needed(declared_field_types, field_name, field_value, format, casted_value): @@ -89,14 +89,14 @@ def test_cast_type_if_needed(declared_field_types, field_name, field_value, form "field_value, declared_format, expected_casted_value", [ ("1653696000000", "date", "2022-05-28"), - ("1645608465000", "date-time", "2022-02-23 09:27:45"), - (1645608465000, "date-time", "2022-02-23 09:27:45"), + ("1645608465000", "date-time", "2022-02-23T09:27:45+00:00"), + (1645608465000, "date-time", "2022-02-23T09:27:45+00:00"), ("2022-05-28", "date", "2022-05-28"), - ("2022-02-23 09:27:45", "date-time", "2022-02-23 09:27:45"), + ("2022-02-23 09:27:45", "date-time", "2022-02-23T09:27:45+00:00"), ("", "date", ""), (None, "date", None), ("2022-02-23 09:27:45", "date", "2022-02-23"), - ("2022-05-28", "date-time", "2022-05-28 00:00:00"), + ("2022-05-28", "date-time", "2022-05-28T00:00:00+00:00"), ], ) def test_cast_timestamp_to_date(field_value, declared_format, expected_casted_value): diff --git a/docs/integrations/sources/hubspot.md b/docs/integrations/sources/hubspot.md index 35c1abdf5b80..3e77cf162419 100644 --- a/docs/integrations/sources/hubspot.md +++ b/docs/integrations/sources/hubspot.md @@ -133,9 +133,10 @@ HubSpot's API will [rate limit](https://developers.hubspot.com/docs/api/usage-de | Version | Date | Pull Request | Subject | |:--------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------| -| 0.1.59 | 2022-05-10 | [\#12711](https://github.com/airbytehq/airbyte/pull/12711) | Ensure oauth2.0 token has all needed scopes in "check" command | -| 0.1.58 | 2022-05-04 | [\#12482](https://github.com/airbytehq/airbyte/pull/12482) | Update input configuration copy | -| 0.1.57 | 2022-05-04 | [12198](https://github.com/airbytehq/airbyte/pull/12198) | Add deals associations for quotes +| 0.1.60 | 2022-05-25 | [\#13159](https://github.com/airbytehq/airbyte/pull/13159) | Use RFC3339 datetime | +| 0.1.59 | 2022-05-10 | [\#12711](https://github.com/airbytehq/airbyte/pull/12711) | Ensure oauth2.0 token has all needed scopes in "check" command | +| 0.1.58 | 2022-05-04 | [\#12482](https://github.com/airbytehq/airbyte/pull/12482) | Update input configuration copy | +| 0.1.57 | 2022-05-04 | [12198](https://github.com/airbytehq/airbyte/pull/12198) | Add deals associations for quotes | | 0.1.56 | 2022-05-02 | [12515](https://github.com/airbytehq/airbyte/pull/12515) | Extra logs for troubleshooting 403 errors | | 0.1.55 | 2022-04-28 | [12424](https://github.com/airbytehq/airbyte/pull/12424) | Correct schema for ticket_pipeline stream | | 0.1.54 | 2022-04-28 | [12335](https://github.com/airbytehq/airbyte/pull/12335) | Mock time slep in unit test s |