Skip to content

Commit cb120fe

Browse files
authored
🐛 Source Marketo: Fix timestamp value format issue (#8298)
* Fix timestamp value format issue * Fix spec to UI handbook * Added expected records to integration tests * Bumped version in seed and spec yaml
1 parent e549068 commit cb120fe

File tree

9 files changed

+62
-13
lines changed

9 files changed

+62
-13
lines changed

airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/9e0556f4-69df-4522-a3fb-03264d36b348.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"sourceDefinitionId": "9e0556f4-69df-4522-a3fb-03264d36b348",
33
"name": "Marketo",
44
"dockerRepository": "airbyte/source-marketo",
5-
"dockerImageTag": "0.1.0",
5+
"dockerImageTag": "0.1.1",
66
"documentationUrl": "https://docs.airbyte.io/integrations/sources/marketo",
77
"icon": "marketo.svg"
88
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@
372372
- name: Marketo
373373
sourceDefinitionId: 9e0556f4-69df-4522-a3fb-03264d36b348
374374
dockerRepository: airbyte/source-marketo
375-
dockerImageTag: 0.1.0
375+
dockerImageTag: 0.1.1
376376
documentationUrl: https://docs.airbyte.io/integrations/sources/marketo
377377
icon: marketo.svg
378378
sourceType: api

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3473,7 +3473,7 @@
34733473
supportsNormalization: false
34743474
supportsDBT: false
34753475
supported_destination_sync_modes: []
3476-
- dockerImage: "airbyte/source-marketo:0.1.0"
3476+
- dockerImage: "airbyte/source-marketo:0.1.1"
34773477
spec:
34783478
documentationUrl: "https://docs.airbyte.io/integrations/sources/marketo"
34793479
connectionSpecification:

airbyte-integrations/connectors/source-marketo/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ COPY source_marketo ./source_marketo
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.0
37+
LABEL io.airbyte.version=0.1.1
3838
LABEL io.airbyte.name=airbyte/source-marketo

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

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ tests:
1616
configured_catalog_path: "integration_tests/configured_catalog.json"
1717
empty_streams: []
1818
timeout_seconds: 3600
19+
expect_records:
20+
path: "integration_tests/expected_records.txt"
1921
incremental:
2022
- config_path: "secrets/config.json"
2123
configured_catalog_path: "integration_tests/configured_catalog.json"

airbyte-integrations/connectors/source-marketo/integration_tests/expected_records.txt

+43
Large diffs are not rendered by default.

airbyte-integrations/connectors/source-marketo/source_marketo/source.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, config: Mapping[str, Any], stream_name: str = None, param: Ma
2929
super().__init__(authenticator=config["authenticator"])
3030
self.config = config
3131
self.start_date = config["start_date"]
32-
self.window_in_days = config["window_in_days"]
32+
self.window_in_days = config.get("window_in_days", 30)
3333
self._url_base = config["domain_url"].rstrip("/") + "/"
3434
self.stream_name = stream_name
3535
self.param = param
@@ -435,7 +435,8 @@ def request_params(
435435

436436
def parse_response(self, response: requests.Response, stream_state: Mapping[str, Any], **kwargs) -> Iterable[Mapping]:
437437
for record in super().parse_response(response, stream_state, **kwargs):
438-
record["updatedAt"] = record["updatedAt"][:-5] # delete +00:00 part from the end of updatedAt
438+
# delete +00:00 part from the end of createdAt and updatedAt
439+
record["updatedAt"], record["createdAt"] = record["updatedAt"][:-5], record["createdAt"][:-5]
439440
yield record
440441

441442

airbyte-integrations/connectors/source-marketo/source_marketo/spec.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,37 @@
55
"title": "Source Marketo Spec",
66
"type": "object",
77
"required": ["domain_url", "client_id", "client_secret", "start_date"],
8-
"additionalProperties": false,
8+
"additionalProperties": true,
99
"properties": {
1010
"domain_url": {
11+
"title": "Domain URL",
1112
"type": "string",
13+
"order": 3,
1214
"description": "Your Marketo Base URL. See <a href=\"https://docs.airbyte.io/integrations/sources/marketo\"> the docs </a> for info on how to obtain this.",
1315
"examples": ["https://000-AAA-000.mktorest.com"],
1416
"airbyte_secret": true
1517
},
1618
"client_id": {
19+
"title": "Client ID",
1720
"type": "string",
21+
"order": 0,
1822
"description": "Your Marketo client_id. See <a href=\"https://docs.airbyte.io/integrations/sources/marketo\"> the docs </a> for info on how to obtain this.",
1923
"airbyte_secret": true
2024
},
2125
"client_secret": {
26+
"title": "Client Secret",
2227
"type": "string",
28+
"order": 1,
2329
"description": "Your Marketo client secret. See <a href=\"https://docs.airbyte.io/integrations/sources/marketo\"> the docs </a> for info on how to obtain this.",
2430
"airbyte_secret": true
2531
},
2632
"start_date": {
33+
"title": "Start Date",
2734
"type": "string",
35+
"order": 2,
2836
"description": "Data generated in Marketo after this date will be replicated. This date must be specified in the format YYYY-MM-DDT00:00:00Z.",
2937
"examples": ["2020-09-25T00:00:00Z"],
3038
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
31-
},
32-
"window_in_days": {
33-
"type": "integer",
34-
"description": "The amount of days for each data-chunk begining from start_date. (Min=1, as for a Day; Max=30, as for a Month).",
35-
"examples": [1, 5, 10, 15, 30],
36-
"default": 30
3739
}
3840
}
3941
}

docs/integrations/sources/marketo.md

+1
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,6 @@ We're almost there! Armed with your Endpoint & Identity URLs and your Client ID
9191

9292
| Version | Date | Pull Request | Subject |
9393
| :--- | :--- | :--- | :--- |
94+
| `0.1.1` | 2021-11-29 | [0000](https://github.com/airbytehq/airbyte/pull/0000) | Fix timestamp value format issue |
9495
| `0.1.0` | 2021-09-06 | [5863](https://github.com/airbytehq/airbyte/pull/5863) | Release Marketo CDK Connector |
9596

0 commit comments

Comments
 (0)