diff --git a/airbyte-integrations/connectors/source-kobotoolbox/Dockerfile b/airbyte-integrations/connectors/source-kobotoolbox/Dockerfile index 88aad6a5fb05..4a255fc9d125 100644 --- a/airbyte-integrations/connectors/source-kobotoolbox/Dockerfile +++ b/airbyte-integrations/connectors/source-kobotoolbox/Dockerfile @@ -32,4 +32,4 @@ 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.name=airbyte/source-kobotoolbox +LABEL io.airbyte.name=tech4dev/source-kobotoolbox diff --git a/airbyte-integrations/connectors/source-kobotoolbox/source_kobotoolbox/source.py b/airbyte-integrations/connectors/source-kobotoolbox/source_kobotoolbox/source.py index c14a7bb85e68..096a67181e59 100644 --- a/airbyte-integrations/connectors/source-kobotoolbox/source_kobotoolbox/source.py +++ b/airbyte-integrations/connectors/source-kobotoolbox/source_kobotoolbox/source.py @@ -24,7 +24,10 @@ "null", ] }, - "endtime": {"type": ["string", "null"]}, + "data": { + "type": "object", + }, + "_submission_time": {"type": ["string", "null"]}, }, } @@ -59,7 +62,7 @@ def name(self) -> str: s = s.strip() return s if len(s) > 0 else self.form_id - # State will be a dict : {'endtime': '2023-03-15T00:00:00.000+05:30'} + # State will be a dict : {'_submission_time': '2023-03-15T00:00:00.000+05:30'} @property def state(self) -> Mapping[str, Any]: @@ -111,7 +114,9 @@ def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapp for to_remove_field in self.exclude_fields: if to_remove_field in record: record.pop(to_remove_field) - yield record + retval = {"_id": record["_id"], "data": record} + retval[self.cursor_field] = record[self.cursor_field] + yield retval def read_records(self, *args, **kwargs) -> Iterable[Mapping[str, Any]]: for record in super().read_records(*args, **kwargs):