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 c12e6d17482d..f007f264885d 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -778,7 +778,7 @@ - name: Insightly sourceDefinitionId: 38f84314-fe6a-4257-97be-a8dcd942d693 dockerRepository: airbyte/source-insightly - dockerImageTag: 0.1.0 + dockerImageTag: 0.1.1 documentationUrl: https://docs.airbyte.com/integrations/sources/insightly icon: insightly.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 635af0131274..2c5f779dafb3 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -6499,7 +6499,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-insightly:0.1.0" +- dockerImage: "airbyte/source-insightly:0.1.1" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/insightly" connectionSpecification: diff --git a/airbyte-integrations/connectors/source-insightly/Dockerfile b/airbyte-integrations/connectors/source-insightly/Dockerfile index 37b76fba0d19..9c32ac56d087 100644 --- a/airbyte-integrations/connectors/source-insightly/Dockerfile +++ b/airbyte-integrations/connectors/source-insightly/Dockerfile @@ -34,5 +34,5 @@ COPY source_insightly ./source_insightly ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.0 +LABEL io.airbyte.version=0.1.1 LABEL io.airbyte.name=airbyte/source-insightly diff --git a/airbyte-integrations/connectors/source-insightly/setup.py b/airbyte-integrations/connectors/source-insightly/setup.py index 490ed64ed1c4..d288f5200b9b 100644 --- a/airbyte-integrations/connectors/source-insightly/setup.py +++ b/airbyte-integrations/connectors/source-insightly/setup.py @@ -7,6 +7,7 @@ MAIN_REQUIREMENTS = [ "airbyte-cdk~=0.2", + "pendulum==2.1.2", ] TEST_REQUIREMENTS = [ diff --git a/airbyte-integrations/connectors/source-insightly/source_insightly/source.py b/airbyte-integrations/connectors/source-insightly/source_insightly/source.py index fe3906c7d958..43889547a9e7 100644 --- a/airbyte-integrations/connectors/source-insightly/source_insightly/source.py +++ b/airbyte-integrations/connectors/source-insightly/source_insightly/source.py @@ -179,7 +179,11 @@ def request_params( start_datetime = pendulum.parse(self.start_date) if stream_state.get(self.cursor_field): - start_datetime = pendulum.parse(stream_state[self.cursor_field]) + start_datetime_raw = stream_state[self.cursor_field] + if isinstance(start_datetime_raw, datetime): + start_datetime = start_datetime_raw + else: + start_datetime = pendulum.parse(stream_state[self.cursor_field]) # Add one second to avoid duplicate records and ensure greater than params.update({"updated_after_utc": (start_datetime + timedelta(seconds=1)).strftime("%Y-%m-%dT%H:%M:%SZ")}) diff --git a/docs/integrations/sources/insightly.md b/docs/integrations/sources/insightly.md index 21f8549ca9c8..3f77f97ed97f 100644 --- a/docs/integrations/sources/insightly.md +++ b/docs/integrations/sources/insightly.md @@ -69,6 +69,7 @@ The connector is restricted by Insightly [requests limitation](https://api.na1.i ## Changelog -| Version | Date | Pull Request | Subject | -| :------ | :--------- | :------------------------------------------------------- | :-------------------------------------------------------------------------------------------- | -| 0.1.0 | 2021-07-19 | | Release Insightly CDK Connector | +| Version | Date | Pull Request | Subject | +| :------ | :--------- | :------------------------------------------------------- | :-------------------------------------------------------------------------------- | +| 0.1.1 | 2022-11-11 | | Fix state date parse bug | +| 0.1.0 | 2022-10-19 | | Release Insightly CDK Connector |